SlideShare a Scribd company logo
1 of 25
Download to read offline
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

More Related Content

More from 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
 

More from 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
 

Recently uploaded

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
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...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

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/