SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
MySQL Load Balancers And It’s Solutions
Mydbops Database Meetup - Aug 2018
Presented by
Vinoth Kanna RS
www.mydbops.com info@mydbops.com
About Mydbops
● Founded in 2015, HQ in Bangalore India with 150+ customer base across the globe.
● Mydbops is on Database Consulting with core specialization on MySQL and MongoDB Administration and
Support.
● We have expert team with 20+ certified DBA’s providing full time support and currently managing 300+
servers.
● Mydbops was created with a motto of developing a DevOPS model for Database administration offering
24*7 expert remote DBA support.
● We help organisations to architect and scale systems in MySQL/MongoDB by implementing the advanced
technologies in industry which are completely open source.
Mydbops is into MySQL/MongoDB Support and Consulting. It is founded by experts
who have scaled database at Yahoo! ,Percona and Datavail. We are providing an
expert level support and 24*7 monitoring for MySQL databases and its related
technologies like MariaDB , Percona ( also clustering ) . We support modern
database technologies in MySQL which includes Galera ( Clustering ), Group
Replication , SQL aware Load balancers like Maxscale / ProxySQL.
About Mydbops
Agenda
● Common MySQL Deployments
● Load balancer Goals
● Maxscale
○ Implementation
○ Applications
● MySQL Router
○ Routing
○ Applications
● ProxySQL
○ Features
○ Monitoring
○ Applications
● References
About Mydbops
● Founded in 2015, HQ in Bangalore India with 150+ customer base across the globe.
● Mydbops is on Database Consulting with core specialization on MySQL and MongoDB Administration and
Support.
● We have expert team with 20+ certified DBA’s providing full time support and currently managing 300+
servers.
● Mydbops was created with a motto of developing a DevOPS model for Database administration offering
24*7 expert remote DBA support.
● We help organisations to architect and scale systems in MySQL/MongoDB by implementing the advanced
technologies in industry which are completely open source.
About Mydbops
● Founded in 2015, HQ in Bangalore India with 150+ customer base across the globe.
● Mydbops is on Database Consulting with core specialization on MySQL and MongoDB Administration and
Support.
● We have expert team with 20+ certified DBA’s providing full time support and currently managing 300+
servers.
● Mydbops was created with a motto of developing a DevOPS model for Database administration offering
24*7 expert remote DBA support.
● We help organisations to architect and scale systems in MySQL/MongoDB by implementing the advanced
technologies in industry which are completely open source.
Common MySQL Deployments
Deployment Models:
● Native MySQL Replication
● Group Replication / InnoDB Cluster
● Galera Replication / MariaDB Cluster / PXC
Traffic Routing:
● No balancing, All requests to Master
● Pointing applications to various nodes
○ Master for read write apps / api’s
○ Own set of slaves for read only apps / api’s
● Haproxy
Load balancer Goals
● Simple proxy layer to connect database pools
● Share the traffic across the available pool of servers
● Flexible routing algorithms
● Handle availability, In case of node failures
● Ability to understand, Monitor various MySQL deployment models
● Transparency in routing
● Ability to Gather metrics, Statistics from the proxy layer
SQL Aware Balancers
Maxscale
● Maxscale is an intelligent load balancer from MariaDB
● Started as a Open Source project, later adopted BSL
● Current version is 2.2.12
● Under BSL, Maximum usage of 3 nodes only allowed for free
Release License Tentative GPL Adoption
v1.4.* GPL -
v2.0.* BSL 1, BSL 1.1 2019-01-01
v2.1.* BSL 1.1 2019-07-01
v2.2.* BSL 1.1 2020-01-01
Maxscale - Implementation
● Maxscale has a modular implementation, For simplicity it classified into 3 categories
○ Monitors
○ Filters
○ Routers
● Monitor: [State Detection]
○ MySQL Replication
○ Galera
○ NDB Cluster
○ Aurora
Maxscale - Implementation
● Filter: [Transform, Log, Route]
○ Database firewall filter - Can be used to whitelist, Blacklist
○ Query log filter - Used to log queries based
○ Tee filter - Used to mirror the traffic
○ Top filter - Used to profile the queries
● Routers: [Perform Routing]
○ readconnroute - Simply balanced connections across servers
○ readwritesplit - Direct writes to Master, Balance reads across servers
○ schemarouter - Route connections based on DB name across servers
○ binlogrouter - Copies Binlog from master, Allows slaves to replicate from it
Maxscale - Applications
Perfect Fit
● Out of box, ReadWrite spliting
● Perfect solution to be used with 3 node
Galera cluster
● Binlog server is one of the most used
feature in Maxscale
● v1.4.5 is still a good choice
● Maxscale is BSL, Is it best to adopt ?
Missing Features
● Group replication, InnoDB Cluster support
● Reconfiguration is not completely online
● User based sharding not possible
● Cannot connect to admin interface
remotely
● Query statistics are not as rich as
ProxySQL
● Not completely Open Source, Not suitable
for rapidly evolving environment
MySQL Router
● Successor of MySQL Proxy
● Current GA release is 8.0.12
● First GA release 2.0.2, focussed to simplify accessing MySQL Fabric
○ It’s caches Topology or Shard information by connecting the Fabric node
○ Routes traffic to designated Shard
○ Deprecated, Last release is 2.0.4
● Release 2.1.3, came as a part of InnoDB cluster, can be deployed through MySQL Shell
○ Added features, Bootstrapping (Auto Config) through mysql_innodb_cluster_metadata
○ Concurrent connection limit increased from 500 to 5000
○ Supports Single primary / Multi primary modes
MySQL Router - Routing
● Router requires to have two endpoints / ports configured one for read and another for
read-write, If we need to balance reads across secondaries and writes only to primary.
● It’s difficult for application that don’t have read-write split in application
● Release 2.*
Modes: read-write, read-only
(During bootstrap, routing depends on variable group_replication_single_primary_mode)
ON OFF
read-write primary round-robin
read-only round-robin not configured
MySQL Router - Routing
● Release 8.0.*
○ Release named after MySQL 8
○ Modes is renamed as Routing Strategy, Is now configurable
■ first-available
■ next-available
■ round-robin
■ round-robin-with-fallback
○ Bootstrapping is improved
MySQL Router - Applications
Perfect Fit
● InnoDB cluster
● Applications with Read / Write
segregation
Missing Features
● Support for replication
● Routing statistics
● Transparency / Missing admin interface
● Run time changes not possible
● Missing out possibilities of being a SQL
Aware proxy
ProxySQL
● Lightweight and powerful load balancer
● Current GA is v1.4.9
● Project started by René Cannaò, Open source
● v1.4.9 features cluster support. Now proxy is never a SPOF
● Native support for replication
● Following technologies through external scripts / schedulers
○ Galera replication (available on proxysql-tools repo)
○ Group replication
○ NDB cluster
● Most of the config changes are dynamic (Uses SQLite as Persistent Store For Config)
ProxySQL - Features
● TTL based query caching
● User, fingerprint, regex based query routing
● Fingerprint / regex based query rewrite
● Regex based query blocking
● Request mirroring is possible
● Sharding based on Schema, User, Queries possible
● Query digest profiles for all the queries are maintained
● Response time of call types are recorded
● Provides extensive stats to troubleshoot and configure efficiently
● PMM provides ProxySQL exporters and Dashboard to visualize stats
● Zero downtime failover, maintenance plans can be achieved by proper configuration
ProxySQL - Monitoring
ProxySQL - Monitoring
ProxySQL - Applications
Perfect Fit
● Large scale deployments
● Galera cluster
● Envs where query change is not possible
● Cache MySQL results efficiently
● Require little effort to integrate auto
reconfiguration of master slave members
during failover
● Reconfiguration can be automated by
using hook scripts with MHA, Orchestrator
Missing Features
● Auto discovery of topology
● Real time query classifier
References
● http://www.proxysql.com/compare
● https://mydbops.wordpress.com/2018/02/19/proxysql-series-mysql-replication-read-write-sp
lit-up/
● https://mydbops.wordpress.com/2018/03/15/proxysql-series-seamless-replication-switchove
r-using-mha/
● https://mydbops.wordpress.com/2018/04/13/proxysql-series-mirroring-mysql-queries/
● https://mydbops.wordpress.com/2018/05/28/proxysql-series-handling-resource-expensiveba
d-queries-in-mysql/
● https://mydbops.wordpress.com/2016/07/25/scale-with-maxscale-part-1/
● https://mydbops.wordpress.com/2016/08/29/scale-with-maxscale-part-2/
● https://mydbops.wordpress.com/2017/08/24/scale-with-max-scale-part-3-replication/
● https://mydbops.wordpress.com/2018/02/21/scale-with-maxscale-part-4-amazon-aurora/
● https://mydbops.wordpress.com/2018/01/29/maxscale-data-archiving-with-filters-mq-tee/
info@mydbops.com
www.mydbops.com
080-48505683
Contact us
Thank You

Weitere ähnliche Inhalte

Mehr von Mydbops

Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...Mydbops
 
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...Mydbops
 
Data Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQLData Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQLMydbops
 
Navigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - MydbopsNavigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - MydbopsMydbops
 
Data High Availability With TIDB
Data High Availability With TIDBData High Availability With TIDB
Data High Availability With TIDBMydbops
 
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...Mydbops
 
Enhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificatesEnhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificatesMydbops
 
Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Mydbops
 
Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops Mydbops
 
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - MydbopsTiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - MydbopsMydbops
 
Achieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQLAchieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQLMydbops
 
Scaling MongoDB with Horizontal and Vertical Sharding
Scaling MongoDB with Horizontal and Vertical Sharding Scaling MongoDB with Horizontal and Vertical Sharding
Scaling MongoDB with Horizontal and Vertical Sharding Mydbops
 
MySQL Data Encryption at Rest
MySQL Data Encryption at RestMySQL Data Encryption at Rest
MySQL Data Encryption at RestMydbops
 
Top-10-Features-In-MySQL-8.0 - Vinoth Kanna RS - Mydbops Team
Top-10-Features-In-MySQL-8.0 - Vinoth Kanna RS - Mydbops TeamTop-10-Features-In-MySQL-8.0 - Vinoth Kanna RS - Mydbops Team
Top-10-Features-In-MySQL-8.0 - Vinoth Kanna RS - Mydbops TeamMydbops
 
Achieving compliance With MongoDB Security
Achieving compliance With MongoDB Security Achieving compliance With MongoDB Security
Achieving compliance With MongoDB Security Mydbops
 
Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...
Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...
Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...Mydbops
 
Use Performance Insights To Enhance MongoDB Performance - (Manosh Malai - Myd...
Use Performance Insights To Enhance MongoDB Performance - (Manosh Malai - Myd...Use Performance Insights To Enhance MongoDB Performance - (Manosh Malai - Myd...
Use Performance Insights To Enhance MongoDB Performance - (Manosh Malai - Myd...Mydbops
 
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...Mydbops
 
Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Mydbops
 
Tuning Autovacuum in Postgresql
Tuning Autovacuum in PostgresqlTuning Autovacuum in Postgresql
Tuning Autovacuum in PostgresqlMydbops
 

Mehr von Mydbops (20)

Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
 
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
 
Data Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQLData Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQL
 
Navigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - MydbopsNavigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
 
Data High Availability With TIDB
Data High Availability With TIDBData High Availability With TIDB
Data High Availability With TIDB
 
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
 
Enhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificatesEnhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificates
 
Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops
 
Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops
 
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - MydbopsTiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
 
Achieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQLAchieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQL
 
Scaling MongoDB with Horizontal and Vertical Sharding
Scaling MongoDB with Horizontal and Vertical Sharding Scaling MongoDB with Horizontal and Vertical Sharding
Scaling MongoDB with Horizontal and Vertical Sharding
 
MySQL Data Encryption at Rest
MySQL Data Encryption at RestMySQL Data Encryption at Rest
MySQL Data Encryption at Rest
 
Top-10-Features-In-MySQL-8.0 - Vinoth Kanna RS - Mydbops Team
Top-10-Features-In-MySQL-8.0 - Vinoth Kanna RS - Mydbops TeamTop-10-Features-In-MySQL-8.0 - Vinoth Kanna RS - Mydbops Team
Top-10-Features-In-MySQL-8.0 - Vinoth Kanna RS - Mydbops Team
 
Achieving compliance With MongoDB Security
Achieving compliance With MongoDB Security Achieving compliance With MongoDB Security
Achieving compliance With MongoDB Security
 
Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...
Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...
Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...
 
Use Performance Insights To Enhance MongoDB Performance - (Manosh Malai - Myd...
Use Performance Insights To Enhance MongoDB Performance - (Manosh Malai - Myd...Use Performance Insights To Enhance MongoDB Performance - (Manosh Malai - Myd...
Use Performance Insights To Enhance MongoDB Performance - (Manosh Malai - Myd...
 
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...
 
Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0
 
Tuning Autovacuum in Postgresql
Tuning Autovacuum in PostgresqlTuning Autovacuum in Postgresql
Tuning Autovacuum in Postgresql
 

Kürzlich hochgeladen

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 

Kürzlich hochgeladen (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

MySQL Load balancer and its solution

  • 1. MySQL Load Balancers And It’s Solutions Mydbops Database Meetup - Aug 2018 Presented by Vinoth Kanna RS www.mydbops.com info@mydbops.com
  • 2. About Mydbops ● Founded in 2015, HQ in Bangalore India with 150+ customer base across the globe. ● Mydbops is on Database Consulting with core specialization on MySQL and MongoDB Administration and Support. ● We have expert team with 20+ certified DBA’s providing full time support and currently managing 300+ servers. ● Mydbops was created with a motto of developing a DevOPS model for Database administration offering 24*7 expert remote DBA support. ● We help organisations to architect and scale systems in MySQL/MongoDB by implementing the advanced technologies in industry which are completely open source.
  • 3. Mydbops is into MySQL/MongoDB Support and Consulting. It is founded by experts who have scaled database at Yahoo! ,Percona and Datavail. We are providing an expert level support and 24*7 monitoring for MySQL databases and its related technologies like MariaDB , Percona ( also clustering ) . We support modern database technologies in MySQL which includes Galera ( Clustering ), Group Replication , SQL aware Load balancers like Maxscale / ProxySQL. About Mydbops
  • 4. Agenda ● Common MySQL Deployments ● Load balancer Goals ● Maxscale ○ Implementation ○ Applications ● MySQL Router ○ Routing ○ Applications ● ProxySQL ○ Features ○ Monitoring ○ Applications ● References
  • 5. About Mydbops ● Founded in 2015, HQ in Bangalore India with 150+ customer base across the globe. ● Mydbops is on Database Consulting with core specialization on MySQL and MongoDB Administration and Support. ● We have expert team with 20+ certified DBA’s providing full time support and currently managing 300+ servers. ● Mydbops was created with a motto of developing a DevOPS model for Database administration offering 24*7 expert remote DBA support. ● We help organisations to architect and scale systems in MySQL/MongoDB by implementing the advanced technologies in industry which are completely open source.
  • 6. About Mydbops ● Founded in 2015, HQ in Bangalore India with 150+ customer base across the globe. ● Mydbops is on Database Consulting with core specialization on MySQL and MongoDB Administration and Support. ● We have expert team with 20+ certified DBA’s providing full time support and currently managing 300+ servers. ● Mydbops was created with a motto of developing a DevOPS model for Database administration offering 24*7 expert remote DBA support. ● We help organisations to architect and scale systems in MySQL/MongoDB by implementing the advanced technologies in industry which are completely open source.
  • 7. Common MySQL Deployments Deployment Models: ● Native MySQL Replication ● Group Replication / InnoDB Cluster ● Galera Replication / MariaDB Cluster / PXC Traffic Routing: ● No balancing, All requests to Master ● Pointing applications to various nodes ○ Master for read write apps / api’s ○ Own set of slaves for read only apps / api’s ● Haproxy
  • 8. Load balancer Goals ● Simple proxy layer to connect database pools ● Share the traffic across the available pool of servers ● Flexible routing algorithms ● Handle availability, In case of node failures ● Ability to understand, Monitor various MySQL deployment models ● Transparency in routing ● Ability to Gather metrics, Statistics from the proxy layer
  • 10. Maxscale ● Maxscale is an intelligent load balancer from MariaDB ● Started as a Open Source project, later adopted BSL ● Current version is 2.2.12 ● Under BSL, Maximum usage of 3 nodes only allowed for free Release License Tentative GPL Adoption v1.4.* GPL - v2.0.* BSL 1, BSL 1.1 2019-01-01 v2.1.* BSL 1.1 2019-07-01 v2.2.* BSL 1.1 2020-01-01
  • 11. Maxscale - Implementation ● Maxscale has a modular implementation, For simplicity it classified into 3 categories ○ Monitors ○ Filters ○ Routers ● Monitor: [State Detection] ○ MySQL Replication ○ Galera ○ NDB Cluster ○ Aurora
  • 12. Maxscale - Implementation ● Filter: [Transform, Log, Route] ○ Database firewall filter - Can be used to whitelist, Blacklist ○ Query log filter - Used to log queries based ○ Tee filter - Used to mirror the traffic ○ Top filter - Used to profile the queries ● Routers: [Perform Routing] ○ readconnroute - Simply balanced connections across servers ○ readwritesplit - Direct writes to Master, Balance reads across servers ○ schemarouter - Route connections based on DB name across servers ○ binlogrouter - Copies Binlog from master, Allows slaves to replicate from it
  • 13. Maxscale - Applications Perfect Fit ● Out of box, ReadWrite spliting ● Perfect solution to be used with 3 node Galera cluster ● Binlog server is one of the most used feature in Maxscale ● v1.4.5 is still a good choice ● Maxscale is BSL, Is it best to adopt ? Missing Features ● Group replication, InnoDB Cluster support ● Reconfiguration is not completely online ● User based sharding not possible ● Cannot connect to admin interface remotely ● Query statistics are not as rich as ProxySQL ● Not completely Open Source, Not suitable for rapidly evolving environment
  • 14. MySQL Router ● Successor of MySQL Proxy ● Current GA release is 8.0.12 ● First GA release 2.0.2, focussed to simplify accessing MySQL Fabric ○ It’s caches Topology or Shard information by connecting the Fabric node ○ Routes traffic to designated Shard ○ Deprecated, Last release is 2.0.4 ● Release 2.1.3, came as a part of InnoDB cluster, can be deployed through MySQL Shell ○ Added features, Bootstrapping (Auto Config) through mysql_innodb_cluster_metadata ○ Concurrent connection limit increased from 500 to 5000 ○ Supports Single primary / Multi primary modes
  • 15. MySQL Router - Routing ● Router requires to have two endpoints / ports configured one for read and another for read-write, If we need to balance reads across secondaries and writes only to primary. ● It’s difficult for application that don’t have read-write split in application ● Release 2.* Modes: read-write, read-only (During bootstrap, routing depends on variable group_replication_single_primary_mode) ON OFF read-write primary round-robin read-only round-robin not configured
  • 16. MySQL Router - Routing ● Release 8.0.* ○ Release named after MySQL 8 ○ Modes is renamed as Routing Strategy, Is now configurable ■ first-available ■ next-available ■ round-robin ■ round-robin-with-fallback ○ Bootstrapping is improved
  • 17. MySQL Router - Applications Perfect Fit ● InnoDB cluster ● Applications with Read / Write segregation Missing Features ● Support for replication ● Routing statistics ● Transparency / Missing admin interface ● Run time changes not possible ● Missing out possibilities of being a SQL Aware proxy
  • 18. ProxySQL ● Lightweight and powerful load balancer ● Current GA is v1.4.9 ● Project started by René Cannaò, Open source ● v1.4.9 features cluster support. Now proxy is never a SPOF ● Native support for replication ● Following technologies through external scripts / schedulers ○ Galera replication (available on proxysql-tools repo) ○ Group replication ○ NDB cluster ● Most of the config changes are dynamic (Uses SQLite as Persistent Store For Config)
  • 19. ProxySQL - Features ● TTL based query caching ● User, fingerprint, regex based query routing ● Fingerprint / regex based query rewrite ● Regex based query blocking ● Request mirroring is possible ● Sharding based on Schema, User, Queries possible ● Query digest profiles for all the queries are maintained ● Response time of call types are recorded ● Provides extensive stats to troubleshoot and configure efficiently ● PMM provides ProxySQL exporters and Dashboard to visualize stats ● Zero downtime failover, maintenance plans can be achieved by proper configuration
  • 22. ProxySQL - Applications Perfect Fit ● Large scale deployments ● Galera cluster ● Envs where query change is not possible ● Cache MySQL results efficiently ● Require little effort to integrate auto reconfiguration of master slave members during failover ● Reconfiguration can be automated by using hook scripts with MHA, Orchestrator Missing Features ● Auto discovery of topology ● Real time query classifier
  • 23. References ● http://www.proxysql.com/compare ● https://mydbops.wordpress.com/2018/02/19/proxysql-series-mysql-replication-read-write-sp lit-up/ ● https://mydbops.wordpress.com/2018/03/15/proxysql-series-seamless-replication-switchove r-using-mha/ ● https://mydbops.wordpress.com/2018/04/13/proxysql-series-mirroring-mysql-queries/ ● https://mydbops.wordpress.com/2018/05/28/proxysql-series-handling-resource-expensiveba d-queries-in-mysql/ ● https://mydbops.wordpress.com/2016/07/25/scale-with-maxscale-part-1/ ● https://mydbops.wordpress.com/2016/08/29/scale-with-maxscale-part-2/ ● https://mydbops.wordpress.com/2017/08/24/scale-with-max-scale-part-3-replication/ ● https://mydbops.wordpress.com/2018/02/21/scale-with-maxscale-part-4-amazon-aurora/ ● https://mydbops.wordpress.com/2018/01/29/maxscale-data-archiving-with-filters-mq-tee/