SlideShare une entreprise Scribd logo
1  sur  50
www.mydbops.com mysqlsupport@mydbops.com
Presenters
Karthik P R ( CEO/ Founder Mydbops )
Kabilesh P R ( Database Consultant )
High Performance and High
Availability Proxies for MySQL
Mydbops is into MySQL Support and Consulting. It is founded by experts who have
scaled MySQL database at Yahoo! ,Percona and Datavail. We are providing an expert level
support and 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, MySQL Engine like InnoDB, TokuDB and MyRocks.
We offer seamless end to end DB solutions like migration, installation, up-gradation, design,
performance tuning, troubleshooting, monitoring, recovery with 24x7 on call support and
Remote DBA support inevitably decreasing the downtime by 99.9%. Our services will improve
your DB Performance and helps in saving cost on IT.
www.mydbops.com mysqlsupport@mydbops.com
About Mydbops
www.mydbops.com mysqlsupport@mydbops.com
Our Clients
Karthik P R
Founder of Mydbops. Has an experience of around 7 years in handling MySQL servers .
Handled large scale systems at Yahoo! ( 3 years ). Active MySQL speakers and blogger.
Currently providing solutions to many established startups and organisation to scale in
MySQL.
Email : prk@mydbops.com Twitter: @prkart
Kabilesh P R
Lead Consultant in Mydbops. Has an experience of about 5 years. Worked with large remote
database support company Datavail on multi customer platform. Expertise in monitoring of
MySQL and actively working with mysql on cloud
www.mydbops.com mysqlsupport@mydbops.com
About US
● Need for Load Balancer
● SQL Awareness Load Balancers
● Introduction to Maxscale
● Maxscale use cases
● Introduction to ProxySQL
● ProxySQL use cases
● Maxscale Vs ProxySQL
www.mydbops.com mysqlsupport@mydbops.com
Agenda
● Load balancer distributes the incoming traffic efficiently to underlying backend servers
● Provides efficient use of the underlying hardware
● Avoids single point of failures ie., High Availability
● Provides way for easy switchover and failover
● Additional Features
www.mydbops.com mysqlsupport@mydbops.com
Need for a Load balancer
Types Of Load Balancers
● Reverse Proxies
○ HAProxy
○ Ngnix
● SQL aware Proxies
○ Maxscale
○ MySQL Router
○ ProxySQL
www.mydbops.com mysqlsupport@mydbops.com
Need for a Load balancer
● SQL aware load balancer, forward the queries/statements by understanding the
underlying state of servers.
● Read/Write splitting.
● Support for external tools and scripts.
● Monitoring of backend servers.
● Query Caching.
● Data Streaming
www.mydbops.com mysqlsupport@mydbops.com
SQL Aware Load Balancer
www.mydbops.com mysqlsupport@mydbops.com
Maxscale
● Maxscale is an intelligent SQL Aware proxy.
● Built by MariaDB corporation
● Pluggable router
● Easy to configure
● Highly Scalable and flexible
● Provides High Availability
www.mydbops.com mysqlsupport@mydbops.com
Introduction To Maxscale
● Maxscale comes with two license model they are GPL (Open Source License) and BSL
(Business Source License).
● Till version 1.4 Maxscale comes with GPL
● From version 2.0 Maxscale comes with BSL
● Usage Limitation of BSL : The usage of software is free for when you are using total or
less than of 3 server for production purposes.
● Change Date of BSL : 2019-01-01
“Business source is simply proprietary software released under a Microsoft-esque shared source license that magically
becomes fully open source after a period of time.”
www.mydbops.com mysqlsupport@mydbops.com
License In Maxscale
● Maxscale Comes with a simple pluggable modular architecture
● Modules are loaded dynamically on demand
● The maxscale core provides the following
Network layer interface
Buffer management
Config Management
Synchronization
www.mydbops.com mysqlsupport@mydbops.com
Maxscale Architecture
www.mydbops.com mysqlsupport@mydbops.com
Maxscale Architecture
www.mydbops.com mysqlsupport@mydbops.com
Maxscale Internal
● Maxscale support the below routing algorithms for various use cases
○ ReadConnRoute - Connection based load balancing
○ ReadWriteSplit - Read/Write aware statement based routing
○ SchemaRouter - Simple Sharding based on database level
○ Binlogrouter - As Binlog server
www.mydbops.com mysqlsupport@mydbops.com
Maxscale Routers
● Maxscale monitor module monitors the underlying cluster/server and provides the status
information to the router based on which the query is routed to the server, the various
supported monitor modules include
○ MySQL Monitor(mysqlmon) - Monitors M-S replication and assign roles
○ Galera Monitor(galeramon) - Monitors the SYNC status of the each cluster node
○ NDBCluster Monitor(ndbclustermon) - Monitors the NDB cluster
○ Multi-Master Monitor(mmmon) - monitors the multi-master replication cluster.
www.mydbops.com mysqlsupport@mydbops.com
Maxscale Monitor
● Configuration file to store the maxscale configurations (/etc/maxscale.cnf) default.
● Similar interface like mysql cmd line
● Has query parser similar to mysql server
● Default port for maxscaled 6603
● Default password is ‘mariadb’ for maxadmin (admin cmd line)
www.mydbops.com mysqlsupport@mydbops.com
Maxscale Configuration
www.mydbops.com mysqlsupport@mydbops.com
Maxscale Configuration
[MaxScale]
threads=auto
[Service Name]
type=service
router=
servers=server1,server2
user=
passwd=
routeroptions=
[listener]
type=listener
service=Service Name
protocol=MySQLClient
port=3306
socket=/tmp/cluster
[monitorName]
type=momitor
module=
servers=server1,server2
user=
passwd=
[server1]
type=server
address=127.0.0.1(IP)
port=3306
[CLI
type=service
router=cli
[CLI Listener]
type=listener
service=CLI
protocol=maxscaled
address=localhost
port=6603
www.mydbops.com mysqlsupport@mydbops.com
Maxscale For Replication
Writes Reads
www.mydbops.com mysqlsupport@mydbops.com
Maxscale For Galera Cluster
Writes Reads Reads
www.mydbops.com mysqlsupport@mydbops.com
Maxscale As Binlog Router
www.mydbops.com mysqlsupport@mydbops.com
Maxscale As Schema Router
www.mydbops.com mysqlsupport@mydbops.com
Maxscale As Data Streamer
● Compression is not supported in mysql server handshake
● With R/W read queries routed to master when they are executed as transaction, in case
of prepared statement, procedure call and multiple statement in one query.
● Maxscale cannot manage authentication with % as hostname, the only accepted wildcard
will be with IP as ‘192.167.2.%’
● Has some limitation with client session variable
www.mydbops.com mysqlsupport@mydbops.com
Maxscale Limitations
● From 2.1 maxscale accepts runtime changes to most of the config
● Support for Aurora Cluster (AWS)
● Selective data Masking
● Secure binlog server using SSL
● Great improvements with query caching.
● Inbuild failover management for promoting slave ( no more external scripts )
www.mydbops.com mysqlsupport@mydbops.com
Maxscale Advanced Features
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL
● Built for DBA’s by a DBA.
● Major Contribution by René Cannaò (Founder)
● Winner MySQL Community Contributor (2017)
● Light weight application.
● Advanced Multi Core Architecture.
● Complete Open Source GPL License (GPL 3.0)
● Current Version 1.3.7 and 1.4 is Beta. ( 17-06-2017 )
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Introduction
● More Granular Configuration
● SQL based Administration.
● Dynamic Configuration
● Advanced Metric Collections.
● Supports More Complex Topologies.
● Seamless Integrations.
● Manage database at large scale ( 1000’s )
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Introduction
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Architecture
● SQLite database to store config.
● MySQL Compatible interface.
● There is no real parser in ProxySQL
● Multi Layer Configuration
● Default port 6032
$mysql -u admin -padmin -h 127.0.0.1 -P6032
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Configuration
● SQLite database to store config.
● MySQL Compatible interface.
● There is no real parser in ProxySQL
● Multi Layer Configuration
● Default port 6032
$mysql -u admin -padmin -h 127.0.0.1 -P6032
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Configuration
Memory: Represent SQLite3 in memory
database
Runtime: In memory store of ProxySQL with
RUNTIME Config.
Disk: On Disk location of SQLite3. Contains
Persistent storage of config.
Config File: Load the config (proxysql.cnf)
when there is no disk file ( proxysql.db)
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Configuration
Loading configuration three levels:
SQL (writes ) are made to table in Memory.
Then load to RUNTIME ( Dynamically ) and
saved to DISK for persistence.
Eg)
Load MYSQL USERS TO RUNTIME;
SAVE MYSQL USERS TO DISK;
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Configuration
Scenario Loading a User
Host groups 101 - Writer , 102 -Reader
insert into mysql_users(username,password,active,default_hostgroup,default_schema) values
('writer_app','test',1,101,'sbtest');
insert into mysql_users(username,password,active,default_hostgroup,default_schema) values
('reader_app','test',1,102,'sbtest');
LOAD MYSQL USERS TO RUNTIME;
SAVE MYSQL USERS TO DISK;
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Configuration
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Replication ( case 1 )
Loading Server Info:
INSERT INTO mysql_servers ( hostname,hostgroup_id,port,weight) VALUES ('192.168.1.1',101,3306,1000);
INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight, max_replication_lag) VALUES
('192.168.1.2',102,3306,10000,2);
INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight, max_replication_lag) VALUES
('192.168.1.3',102,3306,10000,2);
INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight, max_replication_lag) VALUES
('192.168.1.4',102,3306,1,2);
INSERT INTO mysql_replication_hostgroups VALUES (101,102);
Loading Config
LOAD MYSQL SERVERS TO RUNTIME; SAVE MYSQL SERVERS TO DISK;
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Replication ( case 1 )
● ProxySQL can be Integrated with application server to reduce latency.
● Read_only flag defines the availability of readers
● Group of ProxySQL can be designed for complex Infra.
● Schedulers can be made for custom solutions.
● HA Solution for ProxySQL can be made with Keepalived.
● Prepared Statements are not supported in Read/write split
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Replication ( case 1 )
● ProxySQL has in built Query caching.
● Caching is based on the query Rules.
● Cache invalidation is through cache_ttl ( in mysql_query_rules)
● mysql_query_cache_size_MB variables controls it.
● mysql_threshold_resultset_size defines the Maximum size of can be buffered.
● stats_mysql_global has metric related to Query Cache too.
● More Granular control over caching ( Query , User , Schema , Hint )
Note : Query Cache inbuilt with MySQL is Retiring in MySQL 8.0
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Caching ( case 2)
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Caching ( case 2)
Reader - 102
ProxySQL - With Cache
● Caching Rules has to be made in Query rules. ( digest,cache_ttl )
● Rules are made based on digest ( stats_mysql_query_digest )
● TTL defines the invalidation in ms . ( cache_ttl)
● Top Queries can loaded based on Count of execution, Sum of execution time.
● Cache size helps in tuning it based on global stats.
● Background threads take care of memory cleanup and expired entries.
● It can replace Redis , memcache and other 3rd party caching for DB.
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Caching ( case 2)
ProxySQL Caching Vs MySQL Query Cache from official proxysql website
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Caching ( case 2 )
● Galera is cluster based on InnoDB engine.
● Developed by Codership and it is an open source.
● Synchronous replication ( Zero lag )
● Multi Threaded replication.
● Automated node Recovery in case of crash.
● Distributions - Percona XtraDB Cluster , MariaDB Cluster and MySQL ( with plugin ).
● Galera with ProxySQL makes a better High Availability.
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL For Galera ( case 3 )
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL For Galera ( case 3 )
Cluster - 103
ProxySQL ( Cluster )
● Inbuilt schedulers to supports
● Support third party schedulers
● Awares on Galera States during SST / IST
● Desync states in galera.
● Easy Maintenance with status ( ONLINE , SHUNNED,OFFLINE_SOFT,OFFLINE_HARD
)
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL For Galera ( case 3)
Integrations:
● ProxySQL is bundled in Percona XtraDB Cluster 5.7
● Proxy-admin tool by Percona to ease configuration.
● Orchestrator has integration for proxysql.
● Ansible modules helps in easy deployment ( 7 modules are present )
● Prometheus exporters for metrics.
● Integrated with PMM ( Grafana based Dashboards )www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Integration & Deployment
● Query Rewrite
● Sharding ( Schema , User , Query , Hints )
● Persistent Connections
● NDB Cluster Support
● Mirroring
● Query Filter
● Data Masking and more
www.mydbops.com mysqlsupport@mydbops.com
ProxySQL Other use cases
www.mydbops.com mysqlsupport@mydbops.com
Maxscale Vs ProxySQL
Features Maxscale ProxySQL
License BSL/GPL GPL
Group Replication Not Supported Supported
Galera Support Supported Supported
Read/Write Split Query Module ( Classifier ) REGEX
Aurora Support Supported(2.1) Not Supported
Binlog router Supported Not Supported
Kafka Streaming Supported Not Supported
www.mydbops.com mysqlsupport@mydbops.com
Maxscale Vs ProxySQL
Features Maxscale ProxySQL
Multiplexing Not Supported Supported
Caching Control Not Supported Supported
Query Digest Not Supported Supported
Ansible No Modules Ansible Modules
NagiOS Plugins are present No Official
Prometheus No exporters Exporters are present
Clustering Not Supported Not Supported
Queries
www.mydbops.com mysqlsupport@mydbops.com
Reach US
www.mydbops.com
mysqlsupport@mydbops.com
080 - 48505683
www.mydbops.com mysqlsupport@mydbops.com
Thank You

Contenu connexe

Tendances

MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
Abdul Manaf
 

Tendances (20)

MariaDB Galera Cluster presentation
MariaDB Galera Cluster presentationMariaDB Galera Cluster presentation
MariaDB Galera Cluster presentation
 
ProxySQL & PXC(Query routing and Failover Test)
ProxySQL & PXC(Query routing and Failover Test)ProxySQL & PXC(Query routing and Failover Test)
ProxySQL & PXC(Query routing and Failover Test)
 
Planning for Disaster Recovery (DR) with Galera Cluster
Planning for Disaster Recovery (DR) with Galera ClusterPlanning for Disaster Recovery (DR) with Galera Cluster
Planning for Disaster Recovery (DR) with Galera Cluster
 
ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)
 
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
 
MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용
 
Intro ProxySQL
Intro ProxySQLIntro ProxySQL
Intro ProxySQL
 
MySQL Data Encryption at Rest
MySQL Data Encryption at RestMySQL Data Encryption at Rest
MySQL Data Encryption at Rest
 
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
 
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & DemoMySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & Demo
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
 
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationPercona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
 
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesMySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
 
[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
 
MySQL Timeout Variables Explained
MySQL Timeout Variables Explained MySQL Timeout Variables Explained
MySQL Timeout Variables Explained
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
 
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
 
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
 

Similaire à High performance and high availability proxies for MySQL

Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControlWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Continuent
 
Megha_Osi my sql productroadmap
Megha_Osi my sql productroadmapMegha_Osi my sql productroadmap
Megha_Osi my sql productroadmap
OpenSourceIndia
 

Similaire à High performance and high availability proxies for MySQL (20)

MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControlWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
 
SkySQL MariaDB 云数据组件
SkySQL MariaDB 云数据组件SkySQL MariaDB 云数据组件
SkySQL MariaDB 云数据组件
 
Setting up a MySQL Docker Container
Setting up a MySQL Docker ContainerSetting up a MySQL Docker Container
Setting up a MySQL Docker Container
 
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdfMySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
 
User Camp High Availability Presentation
User Camp High Availability PresentationUser Camp High Availability Presentation
User Camp High Availability Presentation
 
NoSQL on MySQL - MySQL Document Store by Vadim Tkachenko
NoSQL on MySQL - MySQL Document Store by Vadim TkachenkoNoSQL on MySQL - MySQL Document Store by Vadim Tkachenko
NoSQL on MySQL - MySQL Document Store by Vadim Tkachenko
 
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin FrankfurtMariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
 
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
MySQL Options in OpenStack
MySQL Options in OpenStackMySQL Options in OpenStack
MySQL Options in OpenStack
 
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
 
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-BackupMariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
 
Megha_Osi my sql productroadmap
Megha_Osi my sql productroadmapMegha_Osi my sql productroadmap
Megha_Osi my sql productroadmap
 
OpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackOpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStack
 
How SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the GameHow SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the Game
 
MariaDB: Connect Storage Engine
MariaDB: Connect Storage EngineMariaDB: Connect Storage Engine
MariaDB: Connect Storage Engine
 
MySQL High Availability Solutions - Avoid loss of service by reducing the r...
MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...
MySQL High Availability Solutions - Avoid loss of service by reducing the r...
 
Customer Experience: InnoDB Cluster Implementation by PR Karthik
Customer Experience: InnoDB Cluster Implementation by PR KarthikCustomer Experience: InnoDB Cluster Implementation by PR Karthik
Customer Experience: InnoDB Cluster Implementation by PR Karthik
 

Plus de Mydbops

Efficient MySQL Indexing and what's new in MySQL Explain
Efficient MySQL Indexing and what's new in MySQL ExplainEfficient MySQL Indexing and what's new in MySQL Explain
Efficient MySQL Indexing and what's new in MySQL Explain
Mydbops
 

Plus de Mydbops (20)

Efficient MySQL Indexing and what's new in MySQL Explain
Efficient MySQL Indexing and what's new in MySQL ExplainEfficient MySQL Indexing and what's new in MySQL Explain
Efficient MySQL Indexing and what's new in MySQL Explain
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
 
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
 
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
Mastering Aurora PostgreSQL Clusters for Disaster RecoveryMastering Aurora PostgreSQL Clusters for Disaster Recovery
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
 
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
 
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
 
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE EventData-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
 
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
 
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
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
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...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 

High performance and high availability proxies for MySQL

  • 1. www.mydbops.com mysqlsupport@mydbops.com Presenters Karthik P R ( CEO/ Founder Mydbops ) Kabilesh P R ( Database Consultant ) High Performance and High Availability Proxies for MySQL
  • 2. Mydbops is into MySQL Support and Consulting. It is founded by experts who have scaled MySQL database at Yahoo! ,Percona and Datavail. We are providing an expert level support and 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, MySQL Engine like InnoDB, TokuDB and MyRocks. We offer seamless end to end DB solutions like migration, installation, up-gradation, design, performance tuning, troubleshooting, monitoring, recovery with 24x7 on call support and Remote DBA support inevitably decreasing the downtime by 99.9%. Our services will improve your DB Performance and helps in saving cost on IT. www.mydbops.com mysqlsupport@mydbops.com About Mydbops
  • 4. Karthik P R Founder of Mydbops. Has an experience of around 7 years in handling MySQL servers . Handled large scale systems at Yahoo! ( 3 years ). Active MySQL speakers and blogger. Currently providing solutions to many established startups and organisation to scale in MySQL. Email : prk@mydbops.com Twitter: @prkart Kabilesh P R Lead Consultant in Mydbops. Has an experience of about 5 years. Worked with large remote database support company Datavail on multi customer platform. Expertise in monitoring of MySQL and actively working with mysql on cloud www.mydbops.com mysqlsupport@mydbops.com About US
  • 5. ● Need for Load Balancer ● SQL Awareness Load Balancers ● Introduction to Maxscale ● Maxscale use cases ● Introduction to ProxySQL ● ProxySQL use cases ● Maxscale Vs ProxySQL www.mydbops.com mysqlsupport@mydbops.com Agenda
  • 6. ● Load balancer distributes the incoming traffic efficiently to underlying backend servers ● Provides efficient use of the underlying hardware ● Avoids single point of failures ie., High Availability ● Provides way for easy switchover and failover ● Additional Features www.mydbops.com mysqlsupport@mydbops.com Need for a Load balancer
  • 7. Types Of Load Balancers ● Reverse Proxies ○ HAProxy ○ Ngnix ● SQL aware Proxies ○ Maxscale ○ MySQL Router ○ ProxySQL www.mydbops.com mysqlsupport@mydbops.com Need for a Load balancer
  • 8. ● SQL aware load balancer, forward the queries/statements by understanding the underlying state of servers. ● Read/Write splitting. ● Support for external tools and scripts. ● Monitoring of backend servers. ● Query Caching. ● Data Streaming www.mydbops.com mysqlsupport@mydbops.com SQL Aware Load Balancer
  • 10. ● Maxscale is an intelligent SQL Aware proxy. ● Built by MariaDB corporation ● Pluggable router ● Easy to configure ● Highly Scalable and flexible ● Provides High Availability www.mydbops.com mysqlsupport@mydbops.com Introduction To Maxscale
  • 11. ● Maxscale comes with two license model they are GPL (Open Source License) and BSL (Business Source License). ● Till version 1.4 Maxscale comes with GPL ● From version 2.0 Maxscale comes with BSL ● Usage Limitation of BSL : The usage of software is free for when you are using total or less than of 3 server for production purposes. ● Change Date of BSL : 2019-01-01 “Business source is simply proprietary software released under a Microsoft-esque shared source license that magically becomes fully open source after a period of time.” www.mydbops.com mysqlsupport@mydbops.com License In Maxscale
  • 12. ● Maxscale Comes with a simple pluggable modular architecture ● Modules are loaded dynamically on demand ● The maxscale core provides the following Network layer interface Buffer management Config Management Synchronization www.mydbops.com mysqlsupport@mydbops.com Maxscale Architecture
  • 15. ● Maxscale support the below routing algorithms for various use cases ○ ReadConnRoute - Connection based load balancing ○ ReadWriteSplit - Read/Write aware statement based routing ○ SchemaRouter - Simple Sharding based on database level ○ Binlogrouter - As Binlog server www.mydbops.com mysqlsupport@mydbops.com Maxscale Routers
  • 16. ● Maxscale monitor module monitors the underlying cluster/server and provides the status information to the router based on which the query is routed to the server, the various supported monitor modules include ○ MySQL Monitor(mysqlmon) - Monitors M-S replication and assign roles ○ Galera Monitor(galeramon) - Monitors the SYNC status of the each cluster node ○ NDBCluster Monitor(ndbclustermon) - Monitors the NDB cluster ○ Multi-Master Monitor(mmmon) - monitors the multi-master replication cluster. www.mydbops.com mysqlsupport@mydbops.com Maxscale Monitor
  • 17. ● Configuration file to store the maxscale configurations (/etc/maxscale.cnf) default. ● Similar interface like mysql cmd line ● Has query parser similar to mysql server ● Default port for maxscaled 6603 ● Default password is ‘mariadb’ for maxadmin (admin cmd line) www.mydbops.com mysqlsupport@mydbops.com Maxscale Configuration
  • 18. www.mydbops.com mysqlsupport@mydbops.com Maxscale Configuration [MaxScale] threads=auto [Service Name] type=service router= servers=server1,server2 user= passwd= routeroptions= [listener] type=listener service=Service Name protocol=MySQLClient port=3306 socket=/tmp/cluster [monitorName] type=momitor module= servers=server1,server2 user= passwd= [server1] type=server address=127.0.0.1(IP) port=3306 [CLI type=service router=cli [CLI Listener] type=listener service=CLI protocol=maxscaled address=localhost port=6603
  • 20. www.mydbops.com mysqlsupport@mydbops.com Maxscale For Galera Cluster Writes Reads Reads
  • 24. ● Compression is not supported in mysql server handshake ● With R/W read queries routed to master when they are executed as transaction, in case of prepared statement, procedure call and multiple statement in one query. ● Maxscale cannot manage authentication with % as hostname, the only accepted wildcard will be with IP as ‘192.167.2.%’ ● Has some limitation with client session variable www.mydbops.com mysqlsupport@mydbops.com Maxscale Limitations
  • 25. ● From 2.1 maxscale accepts runtime changes to most of the config ● Support for Aurora Cluster (AWS) ● Selective data Masking ● Secure binlog server using SSL ● Great improvements with query caching. ● Inbuild failover management for promoting slave ( no more external scripts ) www.mydbops.com mysqlsupport@mydbops.com Maxscale Advanced Features
  • 27. ● Built for DBA’s by a DBA. ● Major Contribution by René Cannaò (Founder) ● Winner MySQL Community Contributor (2017) ● Light weight application. ● Advanced Multi Core Architecture. ● Complete Open Source GPL License (GPL 3.0) ● Current Version 1.3.7 and 1.4 is Beta. ( 17-06-2017 ) www.mydbops.com mysqlsupport@mydbops.com ProxySQL Introduction
  • 28. ● More Granular Configuration ● SQL based Administration. ● Dynamic Configuration ● Advanced Metric Collections. ● Supports More Complex Topologies. ● Seamless Integrations. ● Manage database at large scale ( 1000’s ) www.mydbops.com mysqlsupport@mydbops.com ProxySQL Introduction
  • 30. ● SQLite database to store config. ● MySQL Compatible interface. ● There is no real parser in ProxySQL ● Multi Layer Configuration ● Default port 6032 $mysql -u admin -padmin -h 127.0.0.1 -P6032 www.mydbops.com mysqlsupport@mydbops.com ProxySQL Configuration
  • 31. ● SQLite database to store config. ● MySQL Compatible interface. ● There is no real parser in ProxySQL ● Multi Layer Configuration ● Default port 6032 $mysql -u admin -padmin -h 127.0.0.1 -P6032 www.mydbops.com mysqlsupport@mydbops.com ProxySQL Configuration
  • 32. Memory: Represent SQLite3 in memory database Runtime: In memory store of ProxySQL with RUNTIME Config. Disk: On Disk location of SQLite3. Contains Persistent storage of config. Config File: Load the config (proxysql.cnf) when there is no disk file ( proxysql.db) www.mydbops.com mysqlsupport@mydbops.com ProxySQL Configuration
  • 33. Loading configuration three levels: SQL (writes ) are made to table in Memory. Then load to RUNTIME ( Dynamically ) and saved to DISK for persistence. Eg) Load MYSQL USERS TO RUNTIME; SAVE MYSQL USERS TO DISK; www.mydbops.com mysqlsupport@mydbops.com ProxySQL Configuration
  • 34. Scenario Loading a User Host groups 101 - Writer , 102 -Reader insert into mysql_users(username,password,active,default_hostgroup,default_schema) values ('writer_app','test',1,101,'sbtest'); insert into mysql_users(username,password,active,default_hostgroup,default_schema) values ('reader_app','test',1,102,'sbtest'); LOAD MYSQL USERS TO RUNTIME; SAVE MYSQL USERS TO DISK; www.mydbops.com mysqlsupport@mydbops.com ProxySQL Configuration
  • 36. Loading Server Info: INSERT INTO mysql_servers ( hostname,hostgroup_id,port,weight) VALUES ('192.168.1.1',101,3306,1000); INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight, max_replication_lag) VALUES ('192.168.1.2',102,3306,10000,2); INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight, max_replication_lag) VALUES ('192.168.1.3',102,3306,10000,2); INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight, max_replication_lag) VALUES ('192.168.1.4',102,3306,1,2); INSERT INTO mysql_replication_hostgroups VALUES (101,102); Loading Config LOAD MYSQL SERVERS TO RUNTIME; SAVE MYSQL SERVERS TO DISK; www.mydbops.com mysqlsupport@mydbops.com ProxySQL Replication ( case 1 )
  • 37. ● ProxySQL can be Integrated with application server to reduce latency. ● Read_only flag defines the availability of readers ● Group of ProxySQL can be designed for complex Infra. ● Schedulers can be made for custom solutions. ● HA Solution for ProxySQL can be made with Keepalived. ● Prepared Statements are not supported in Read/write split www.mydbops.com mysqlsupport@mydbops.com ProxySQL Replication ( case 1 )
  • 38. ● ProxySQL has in built Query caching. ● Caching is based on the query Rules. ● Cache invalidation is through cache_ttl ( in mysql_query_rules) ● mysql_query_cache_size_MB variables controls it. ● mysql_threshold_resultset_size defines the Maximum size of can be buffered. ● stats_mysql_global has metric related to Query Cache too. ● More Granular control over caching ( Query , User , Schema , Hint ) Note : Query Cache inbuilt with MySQL is Retiring in MySQL 8.0 www.mydbops.com mysqlsupport@mydbops.com ProxySQL Caching ( case 2)
  • 39. www.mydbops.com mysqlsupport@mydbops.com ProxySQL Caching ( case 2) Reader - 102 ProxySQL - With Cache
  • 40. ● Caching Rules has to be made in Query rules. ( digest,cache_ttl ) ● Rules are made based on digest ( stats_mysql_query_digest ) ● TTL defines the invalidation in ms . ( cache_ttl) ● Top Queries can loaded based on Count of execution, Sum of execution time. ● Cache size helps in tuning it based on global stats. ● Background threads take care of memory cleanup and expired entries. ● It can replace Redis , memcache and other 3rd party caching for DB. www.mydbops.com mysqlsupport@mydbops.com ProxySQL Caching ( case 2)
  • 41. ProxySQL Caching Vs MySQL Query Cache from official proxysql website www.mydbops.com mysqlsupport@mydbops.com ProxySQL Caching ( case 2 )
  • 42. ● Galera is cluster based on InnoDB engine. ● Developed by Codership and it is an open source. ● Synchronous replication ( Zero lag ) ● Multi Threaded replication. ● Automated node Recovery in case of crash. ● Distributions - Percona XtraDB Cluster , MariaDB Cluster and MySQL ( with plugin ). ● Galera with ProxySQL makes a better High Availability. www.mydbops.com mysqlsupport@mydbops.com ProxySQL For Galera ( case 3 )
  • 43. www.mydbops.com mysqlsupport@mydbops.com ProxySQL For Galera ( case 3 ) Cluster - 103 ProxySQL ( Cluster )
  • 44. ● Inbuilt schedulers to supports ● Support third party schedulers ● Awares on Galera States during SST / IST ● Desync states in galera. ● Easy Maintenance with status ( ONLINE , SHUNNED,OFFLINE_SOFT,OFFLINE_HARD ) www.mydbops.com mysqlsupport@mydbops.com ProxySQL For Galera ( case 3)
  • 45. Integrations: ● ProxySQL is bundled in Percona XtraDB Cluster 5.7 ● Proxy-admin tool by Percona to ease configuration. ● Orchestrator has integration for proxysql. ● Ansible modules helps in easy deployment ( 7 modules are present ) ● Prometheus exporters for metrics. ● Integrated with PMM ( Grafana based Dashboards )www.mydbops.com mysqlsupport@mydbops.com ProxySQL Integration & Deployment
  • 46. ● Query Rewrite ● Sharding ( Schema , User , Query , Hints ) ● Persistent Connections ● NDB Cluster Support ● Mirroring ● Query Filter ● Data Masking and more www.mydbops.com mysqlsupport@mydbops.com ProxySQL Other use cases
  • 47. www.mydbops.com mysqlsupport@mydbops.com Maxscale Vs ProxySQL Features Maxscale ProxySQL License BSL/GPL GPL Group Replication Not Supported Supported Galera Support Supported Supported Read/Write Split Query Module ( Classifier ) REGEX Aurora Support Supported(2.1) Not Supported Binlog router Supported Not Supported Kafka Streaming Supported Not Supported
  • 48. www.mydbops.com mysqlsupport@mydbops.com Maxscale Vs ProxySQL Features Maxscale ProxySQL Multiplexing Not Supported Supported Caching Control Not Supported Supported Query Digest Not Supported Supported Ansible No Modules Ansible Modules NagiOS Plugins are present No Official Prometheus No exporters Exporters are present Clustering Not Supported Not Supported