SlideShare a Scribd company logo
How QBerg scaled to store data
longer, query it faster
Openworks 2019
QBerg: the company
▪ QBerg is a market research institute
▪ QBerg deals with consumer goods’ price intelligence in Italy,
Europe and Latam.
▪ What we do:
- Collect price & presence of products into stores, flyers, e-commerce
sites and newsletters;
- Manage the data collected with automatic and human activity;
- Deliver aggregated data or raw-data format to our customers in many
ways (portal with analysis and research functions, Spredsheets, alert e-
mails, PPTx, csv, etc)
QPoint
▪ QBerg has lanched the new innovative App in early February
2019:
https://vimeo.com/channels/qpointeng/316057717
How QBerg scaled to store data longer, query it faster
Data figures
▪ Data Collection:
▪ Web: 1M observations/day
▪ Flyer: 500K observations/month
▪ Store: 500K observations/month
▪ Common Data:
▪ #Products: 2M
▪ #Stores: 120K
▪ MariaDB Master (TX):
▪ #Schemas: 175 (master, datamarts)
▪ #Tables: 11,756
▪ #Space: 650 GB
Master common schemas
▪ Common data (3GB)
▪ Store observations (3GB)
▪ Flyer observations (14GB)
▪ Web observations (70GB)
▪ User logs/actions (18GB)
▪ Third party catalogues (3GB)
▪ User segmentations (3GB)
TOTAL 114 GB (Master schema InnoDB tables)
«One-day» schemas (Datamarts)
▪ Every night batch procedures produce several «one-day»
databases (datamarts). These databases are used by users’
frontend and backend procedures that process and produce
outputs in several formats.
▪ A datamart is defined by:
▪ Type: store, web, flyer
▪ Time period: last 2 years, last 6 monts, last 36 weeks, etc…
▪ Countries or regions: Italy, Spain, Colombia, etc
▪ Product Families: Flat TV, Washing machines, Bakery and pastries, etc.
▪ Current procedures used a massive quantity of:
▪ CREATE TABLE <DMs> SELECT FROM <MASTER DB>
▪ INSERT INTO <DMs> SELECT FROM <MASTER DB>
DB timeline mainly activities
Production architecture t0
MariaDB Server
(secondary)
MariaDB Server
(primary)
Applications
Queries
Replication
Backups
Issues
▪ General issues:
▪ Crawler queue was very heavy (200 concurrencies)
▪ Having OLTP and OLAP operations on the same db machine is not a
good idea…
▪ Web datamarts
▪ The creation with ETL CREATE SELECT was very slow
▪ The customer queries were slow
▪ The amount of periods (historical data time span) were too little
Targets
▪ Make customer queries faster
▪ Uncouple OLTP and OLAP operations
▪ Increase datamarts periods (from 4 to 24 months on web prices)
Solution phase 1
▪ Introduced MariaDB AX using INNODB and COLUMSTORE:
▪ INNODB Engine to manage master schemas
▪ Column Store Engine to manage store and web datamart schemas
▪ Datamart schemas are produced with the current procedure and
copied from TX to AX with cpimport
▪ Introduced MariaDB Maxscale:
▪ Routing query to TX (master / slave) or AX, based on schema used by
query (using regex)
▪ Duplicates DDL (Data Definition Language) statements on MariaDB AX
MariaDB
MaxScale
Production phase 1
Applications
MariaDB Server
(secondary)
MariaDB Server
(primary)
MariaDB Server (UM)
MariaDB
MaxScale
Storage (PM)
ColumnStore
(web/store dm)
InnoDB
(master)
Backups
Reads (current data)
Writes (all data), + Reads (historical data)
Replication cpimport
Writes (all data)
Reads (current data)
Replicate Table On-the-fly
▪ When merging data between TX and AX is needed, it’s possible
to copy data from TX to AX using a simple script like this:
mysql -h $DBSRC -q -e "$QUERY;" -N temp | cpimport -n1 -s 't' $DBDST $TABLEDST
▪ Note:
▪ To be ran on AX (UM) server.
▪ The destination table must exist in advance
Replicate schema
▪ It’s possible to replicate an entire schema using the script seen
in the former slide, from every table of the source schema.
▪ It could be necessary to change datatypes:
▪ ENUM is not supported in CS -> CHAR could be good
▪ TIMESTAMP is not supported in CS -> DATETIME could be
good
▪ MEDIUMINT is not supported in CS -> BIGINT could be good
▪ BINARY is not supported in CS -> BIGINT could be good
▪ Note:
▪ 246 tables imported in 1,136 secs (~19’)
▪ 43M rows table imported in 400 secs (6’40")
Master-slave delay
▪ Maxscale implements a policy to route query to slave only if the
replication delay is under a threshold (configurable i.e. 1s)
▪ Maxscale polls the slave delay every xx seconds (configurable i.e
0.5s)
▪ If you have a classic master-detail interface (a master list and the
details for the currently selected item), there are several solutions to
retrieve a list with the last inserted record:
▪ Insert a sleep delay waiting slave updates into application;
▪ Introduce statement to forcefully route the query to the master (for example
<space>SELECT);
▪ Exclude readings from slave.
▪ QBerg have a lot of PHP code written in more than 10 years. At the
moment we choose the last option. We’ll use the query to slave for
«SELECT only» when we’ll have completed the migration to new
application architecture.
MariaDB
MaxScale
Production phase 2
Applications
MariaDB Server
(secondary)
MariaDB Server
(primary)
MariaDB Server (UM)
MariaDB
MaxScale
Storage (PM)
ColumnStore
(web/store dm)
InnoDB
(master)
Backups
Writes (all data), Reads (historical data)
Replication cpimport
Writes (all data),
Reads (current data)
MariaDB
MaxScale
Staging
MariaDB Server
(primary)
MariaDB Server (UM + PM)
MariaDB
MaxScale
Storage (PM)
ColumnStore
(web/store dm)
InnoDB
(master)
Writes (all),
Reads (historical)
cpimport
Writes (all),
Reads (current)
Single server
A Team job
▪ 21 support requests in 5 months
▪ 8 different support engineers working to help
▪ Average time on big issues resolution : 4.5 days
▪ Found bug in maxscale 2.2.13 (MXS-2103) immediately
resolved with a custom fix by Marko Mäkelä
THANKS

More Related Content

What's hot (20)

PDF
MariaDB Enterprise Tools introduction
MariaDB plc
 
PDF
Faster, better, stronger: The new InnoDB
MariaDB plc
 
PDF
MariaDB ColumnStore
MariaDB plc
 
PDF
Getting started in the cloud for developers
MariaDB plc
 
PDF
Introducing the R2DBC async Java connector
MariaDB plc
 
PDF
How MariaDB is approaching DBaaS
MariaDB plc
 
PDF
What’s new in Galera 4
MariaDB plc
 
PDF
Global Data Replication with Galera for Ansell Guardian®
MariaDB plc
 
PPTX
ClustrixDB: how distributed databases scale out
MariaDB plc
 
PPTX
How Orwell built a geo-distributed Bank-as-a-Service with microservices
MariaDB plc
 
PPTX
How Alibaba Cloud scaled ApsaraDB with MariaDB MaxScale
MariaDB plc
 
PDF
Under the hood: SkySQL monitoring
MariaDB plc
 
PDF
MariaDB Server Performance Tuning & Optimization
MariaDB plc
 
PDF
Webinar slides: How to Migrate from Oracle DB to MariaDB
Severalnines
 
PPTX
ClustrixDB at Samsung Cloud
MariaDB plc
 
PPTX
Inside CynosDB: MariaDB optimized for the cloud at Tencent
MariaDB plc
 
PDF
Scylla Summit 2022: How ScyllaDB Powers This Next Tech Cycle
ScyllaDB
 
PPTX
How to power microservices with MariaDB
MariaDB plc
 
PPTX
M|18 How Facebook Migrated to MyRocks
MariaDB plc
 
PPTX
M|18 Creating a Reference Architecture for High Availability at Nokia
MariaDB plc
 
MariaDB Enterprise Tools introduction
MariaDB plc
 
Faster, better, stronger: The new InnoDB
MariaDB plc
 
MariaDB ColumnStore
MariaDB plc
 
Getting started in the cloud for developers
MariaDB plc
 
Introducing the R2DBC async Java connector
MariaDB plc
 
How MariaDB is approaching DBaaS
MariaDB plc
 
What’s new in Galera 4
MariaDB plc
 
Global Data Replication with Galera for Ansell Guardian®
MariaDB plc
 
ClustrixDB: how distributed databases scale out
MariaDB plc
 
How Orwell built a geo-distributed Bank-as-a-Service with microservices
MariaDB plc
 
How Alibaba Cloud scaled ApsaraDB with MariaDB MaxScale
MariaDB plc
 
Under the hood: SkySQL monitoring
MariaDB plc
 
MariaDB Server Performance Tuning & Optimization
MariaDB plc
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Severalnines
 
ClustrixDB at Samsung Cloud
MariaDB plc
 
Inside CynosDB: MariaDB optimized for the cloud at Tencent
MariaDB plc
 
Scylla Summit 2022: How ScyllaDB Powers This Next Tech Cycle
ScyllaDB
 
How to power microservices with MariaDB
MariaDB plc
 
M|18 How Facebook Migrated to MyRocks
MariaDB plc
 
M|18 Creating a Reference Architecture for High Availability at Nokia
MariaDB plc
 

Similar to How QBerg scaled to store data longer, query it faster (20)

PDF
Big Data Analytics with MariaDB ColumnStore
MariaDB plc
 
PDF
MariaDB ColumnStore
MariaDB plc
 
PDF
Big Data Analytics with MariaDB ColumnStore
MariaDB plc
 
PDF
Introduction of MariaDB AX / TX
GOTO Satoru
 
PDF
Advanced MariaDB features that developers love.pdf
Federico Razzoli
 
PDF
Big Data LDN 2017: Big Data Analytics with MariaDB ColumnStore
Matt Stubbs
 
PDF
[db tech showcase OSS 2017] A23: Analytics with MariaDB ColumnStore by MariaD...
Insight Technology, Inc.
 
PDF
[db tech showcase OSS 2017] A25: Replacing Oracle Database at DBS Bank by Mar...
Insight Technology, Inc.
 
PDF
Big Data Analytics with MariaDB ColumnStore
MariaDB plc
 
PDF
M|18 Understanding the Architecture of MariaDB ColumnStore
MariaDB plc
 
PDF
Understanding the architecture of MariaDB ColumnStore
MariaDB plc
 
PPTX
MySQL vs. MonetDB
"FENG "GEORGE"" YU
 
PDF
What’s new in MariaDB ColumnStore
MariaDB plc
 
PDF
Big Data Analytics with MariaDB ColumnStore
MariaDB plc
 
PDF
Sesión técnica: Big Data Analytics con MariaDB ColumnStore
MariaDB plc
 
PDF
What's new in MariaDB TX 3.0
MariaDB plc
 
PDF
04 2017 emea_roadshowmilan_mariadb columnstore
mlraviol
 
PDF
Intro to column stores
Justin Swanhart
 
PPTX
What's new in MariaDB TX 3.0
MariaDB plc
 
PDF
Fosdem2012 mariadb-5.3-query-optimizer-r2
Sergey Petrunya
 
Big Data Analytics with MariaDB ColumnStore
MariaDB plc
 
MariaDB ColumnStore
MariaDB plc
 
Big Data Analytics with MariaDB ColumnStore
MariaDB plc
 
Introduction of MariaDB AX / TX
GOTO Satoru
 
Advanced MariaDB features that developers love.pdf
Federico Razzoli
 
Big Data LDN 2017: Big Data Analytics with MariaDB ColumnStore
Matt Stubbs
 
[db tech showcase OSS 2017] A23: Analytics with MariaDB ColumnStore by MariaD...
Insight Technology, Inc.
 
[db tech showcase OSS 2017] A25: Replacing Oracle Database at DBS Bank by Mar...
Insight Technology, Inc.
 
Big Data Analytics with MariaDB ColumnStore
MariaDB plc
 
M|18 Understanding the Architecture of MariaDB ColumnStore
MariaDB plc
 
Understanding the architecture of MariaDB ColumnStore
MariaDB plc
 
MySQL vs. MonetDB
"FENG "GEORGE"" YU
 
What’s new in MariaDB ColumnStore
MariaDB plc
 
Big Data Analytics with MariaDB ColumnStore
MariaDB plc
 
Sesión técnica: Big Data Analytics con MariaDB ColumnStore
MariaDB plc
 
What's new in MariaDB TX 3.0
MariaDB plc
 
04 2017 emea_roadshowmilan_mariadb columnstore
mlraviol
 
Intro to column stores
Justin Swanhart
 
What's new in MariaDB TX 3.0
MariaDB plc
 
Fosdem2012 mariadb-5.3-query-optimizer-r2
Sergey Petrunya
 
Ad

More from MariaDB plc (19)

PDF
MariaDB Berlin Roadshow Slides - 8 April 2025
MariaDB plc
 
PDF
MariaDB München Roadshow - 24 September, 2024
MariaDB plc
 
PDF
MariaDB Paris Roadshow - 19 September 2024
MariaDB plc
 
PDF
MariaDB Amsterdam Roadshow: 19 September, 2024
MariaDB plc
 
PDF
MariaDB Paris Workshop 2023 - MaxScale 23.02.x
MariaDB plc
 
PDF
MariaDB Paris Workshop 2023 - Newpharma
MariaDB plc
 
PDF
MariaDB Paris Workshop 2023 - Cloud
MariaDB plc
 
PDF
MariaDB Paris Workshop 2023 - MariaDB Enterprise
MariaDB plc
 
PDF
MariaDB Paris Workshop 2023 - Performance Optimization
MariaDB plc
 
PDF
MariaDB Paris Workshop 2023 - MaxScale
MariaDB plc
 
PDF
MariaDB Paris Workshop 2023 - novadys presentation
MariaDB plc
 
PDF
MariaDB Paris Workshop 2023 - DARVA presentation
MariaDB plc
 
PDF
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
MariaDB plc
 
PDF
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
MariaDB plc
 
PDF
Einführung : MariaDB Tech und Business Update Hamburg 2023
MariaDB plc
 
PDF
Hochverfügbarkeitslösungen mit MariaDB
MariaDB plc
 
PDF
Die Neuheiten in MariaDB Enterprise Server
MariaDB plc
 
PDF
Introducing workload analysis
MariaDB plc
 
PDF
Beyond the basics: advanced SQL with MariaDB
MariaDB plc
 
MariaDB Berlin Roadshow Slides - 8 April 2025
MariaDB plc
 
MariaDB München Roadshow - 24 September, 2024
MariaDB plc
 
MariaDB Paris Roadshow - 19 September 2024
MariaDB plc
 
MariaDB Amsterdam Roadshow: 19 September, 2024
MariaDB plc
 
MariaDB Paris Workshop 2023 - MaxScale 23.02.x
MariaDB plc
 
MariaDB Paris Workshop 2023 - Newpharma
MariaDB plc
 
MariaDB Paris Workshop 2023 - Cloud
MariaDB plc
 
MariaDB Paris Workshop 2023 - MariaDB Enterprise
MariaDB plc
 
MariaDB Paris Workshop 2023 - Performance Optimization
MariaDB plc
 
MariaDB Paris Workshop 2023 - MaxScale
MariaDB plc
 
MariaDB Paris Workshop 2023 - novadys presentation
MariaDB plc
 
MariaDB Paris Workshop 2023 - DARVA presentation
MariaDB plc
 
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
MariaDB plc
 
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
MariaDB plc
 
Einführung : MariaDB Tech und Business Update Hamburg 2023
MariaDB plc
 
Hochverfügbarkeitslösungen mit MariaDB
MariaDB plc
 
Die Neuheiten in MariaDB Enterprise Server
MariaDB plc
 
Introducing workload analysis
MariaDB plc
 
Beyond the basics: advanced SQL with MariaDB
MariaDB plc
 
Ad

Recently uploaded (20)

PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 

How QBerg scaled to store data longer, query it faster

  • 1. How QBerg scaled to store data longer, query it faster Openworks 2019
  • 2. QBerg: the company ▪ QBerg is a market research institute ▪ QBerg deals with consumer goods’ price intelligence in Italy, Europe and Latam. ▪ What we do: - Collect price & presence of products into stores, flyers, e-commerce sites and newsletters; - Manage the data collected with automatic and human activity; - Deliver aggregated data or raw-data format to our customers in many ways (portal with analysis and research functions, Spredsheets, alert e- mails, PPTx, csv, etc)
  • 3. QPoint ▪ QBerg has lanched the new innovative App in early February 2019: https://vimeo.com/channels/qpointeng/316057717
  • 5. Data figures ▪ Data Collection: ▪ Web: 1M observations/day ▪ Flyer: 500K observations/month ▪ Store: 500K observations/month ▪ Common Data: ▪ #Products: 2M ▪ #Stores: 120K ▪ MariaDB Master (TX): ▪ #Schemas: 175 (master, datamarts) ▪ #Tables: 11,756 ▪ #Space: 650 GB
  • 6. Master common schemas ▪ Common data (3GB) ▪ Store observations (3GB) ▪ Flyer observations (14GB) ▪ Web observations (70GB) ▪ User logs/actions (18GB) ▪ Third party catalogues (3GB) ▪ User segmentations (3GB) TOTAL 114 GB (Master schema InnoDB tables)
  • 7. «One-day» schemas (Datamarts) ▪ Every night batch procedures produce several «one-day» databases (datamarts). These databases are used by users’ frontend and backend procedures that process and produce outputs in several formats. ▪ A datamart is defined by: ▪ Type: store, web, flyer ▪ Time period: last 2 years, last 6 monts, last 36 weeks, etc… ▪ Countries or regions: Italy, Spain, Colombia, etc ▪ Product Families: Flat TV, Washing machines, Bakery and pastries, etc. ▪ Current procedures used a massive quantity of: ▪ CREATE TABLE <DMs> SELECT FROM <MASTER DB> ▪ INSERT INTO <DMs> SELECT FROM <MASTER DB>
  • 8. DB timeline mainly activities
  • 9. Production architecture t0 MariaDB Server (secondary) MariaDB Server (primary) Applications Queries Replication Backups
  • 10. Issues ▪ General issues: ▪ Crawler queue was very heavy (200 concurrencies) ▪ Having OLTP and OLAP operations on the same db machine is not a good idea… ▪ Web datamarts ▪ The creation with ETL CREATE SELECT was very slow ▪ The customer queries were slow ▪ The amount of periods (historical data time span) were too little
  • 11. Targets ▪ Make customer queries faster ▪ Uncouple OLTP and OLAP operations ▪ Increase datamarts periods (from 4 to 24 months on web prices)
  • 12. Solution phase 1 ▪ Introduced MariaDB AX using INNODB and COLUMSTORE: ▪ INNODB Engine to manage master schemas ▪ Column Store Engine to manage store and web datamart schemas ▪ Datamart schemas are produced with the current procedure and copied from TX to AX with cpimport ▪ Introduced MariaDB Maxscale: ▪ Routing query to TX (master / slave) or AX, based on schema used by query (using regex) ▪ Duplicates DDL (Data Definition Language) statements on MariaDB AX
  • 13. MariaDB MaxScale Production phase 1 Applications MariaDB Server (secondary) MariaDB Server (primary) MariaDB Server (UM) MariaDB MaxScale Storage (PM) ColumnStore (web/store dm) InnoDB (master) Backups Reads (current data) Writes (all data), + Reads (historical data) Replication cpimport Writes (all data) Reads (current data)
  • 14. Replicate Table On-the-fly ▪ When merging data between TX and AX is needed, it’s possible to copy data from TX to AX using a simple script like this: mysql -h $DBSRC -q -e "$QUERY;" -N temp | cpimport -n1 -s 't' $DBDST $TABLEDST ▪ Note: ▪ To be ran on AX (UM) server. ▪ The destination table must exist in advance
  • 15. Replicate schema ▪ It’s possible to replicate an entire schema using the script seen in the former slide, from every table of the source schema. ▪ It could be necessary to change datatypes: ▪ ENUM is not supported in CS -> CHAR could be good ▪ TIMESTAMP is not supported in CS -> DATETIME could be good ▪ MEDIUMINT is not supported in CS -> BIGINT could be good ▪ BINARY is not supported in CS -> BIGINT could be good ▪ Note: ▪ 246 tables imported in 1,136 secs (~19’) ▪ 43M rows table imported in 400 secs (6’40")
  • 16. Master-slave delay ▪ Maxscale implements a policy to route query to slave only if the replication delay is under a threshold (configurable i.e. 1s) ▪ Maxscale polls the slave delay every xx seconds (configurable i.e 0.5s) ▪ If you have a classic master-detail interface (a master list and the details for the currently selected item), there are several solutions to retrieve a list with the last inserted record: ▪ Insert a sleep delay waiting slave updates into application; ▪ Introduce statement to forcefully route the query to the master (for example <space>SELECT); ▪ Exclude readings from slave. ▪ QBerg have a lot of PHP code written in more than 10 years. At the moment we choose the last option. We’ll use the query to slave for «SELECT only» when we’ll have completed the migration to new application architecture.
  • 17. MariaDB MaxScale Production phase 2 Applications MariaDB Server (secondary) MariaDB Server (primary) MariaDB Server (UM) MariaDB MaxScale Storage (PM) ColumnStore (web/store dm) InnoDB (master) Backups Writes (all data), Reads (historical data) Replication cpimport Writes (all data), Reads (current data)
  • 18. MariaDB MaxScale Staging MariaDB Server (primary) MariaDB Server (UM + PM) MariaDB MaxScale Storage (PM) ColumnStore (web/store dm) InnoDB (master) Writes (all), Reads (historical) cpimport Writes (all), Reads (current) Single server
  • 19. A Team job ▪ 21 support requests in 5 months ▪ 8 different support engineers working to help ▪ Average time on big issues resolution : 4.5 days ▪ Found bug in maxscale 2.2.13 (MXS-2103) immediately resolved with a custom fix by Marko Mäkelä