SlideShare a Scribd company logo
ProxySQL Use
Case Scenarios
HighLoad++ Nov
7-8 2017
Alkin Tezuysal
Who we are
• Alkin Tezuysal
Sr. Technical Manager, Percona
@ask_dba, https://www.linkedin.com/in/askdba/
• René Cannaò
MySQL SRE, Dropbox / ProxySQL
@proxysql
ProxySQL Users
Other Sessions
• 156. Inexpensive Datamasking for MySQL with
ProxySQL — Data Anonymization for Developers /
Rene Cannao (ProxySQL)
• 273. ProxySQL, MaxScale, MySQL Router and other
database traffic managers / Petr Zaitsev (Percona)
Top 5 reasons to use ProxySQL
• Improve database operations.
• Understand and solve performance issues.
• Create a proxy layer to shield the database.
• Add High-Availability to database topology.
• Empower the DBAs with great tool.
ProxySQL Highlights
Scalability High Availability
Advanced Query
Support
Manageability
Use case overview - Scalability
Connection Pooling
and Multiplexing
Add connection
pooling layer
Reduce
connection
thread overhead
Read / Write Split
More scalability
for any MySQL
topology
Must for any
heavy workloads
Read / Write
Sharding
Effortless
sharding
implementation
Without Dev.
support and cost
savings
Use case overview - High Availability
Seamless Failover
Gracef
ul failover
support
Query rerouting
Load Balancing
Allows easy
scaling
For better
utilization of
servers
Cluster Aware
Supports
PXC/Galera
implementations
Small footprint
for big gain
Use case overview - Advanced
Queries
Query caching Cache frequently
used data
Adds another
cache layer
Query rewrite Add SQL
flexibility
Faster problem
solving
Query blocking Add database
aware firewall
Without App.
support
Use case overview - Advanced
Queries
Query mirroring
Audit, Analyze,
Review, Cache
Warming
Allow
benchmarking on
live data
Query throttling
Set prioritization
for important
queries
Allows manual
intervention to
problem queries
Query timeout Add another
timeout layer
Flexible query
level timeout
Use case overview - Manageability
Admin Utility Authentication
support
Limit user access
to database pool
Runtime
reconfiguration
On the fly
modifications
Configure
database without
restart or
downtime
Monitoring Stats collection
and reporting
Investigate
database
workload
Scalability with ProxySQL -
Connection Pooling
• Any application without persistent connection to database
• PHP applications to be specific without built in connection pool
Application MySQLProxySQL
• Reduces number of new connections to the database
Scalability with ProxySQL -
Connection Pooling and SSL
https://www.percona.com/blog/2017/09/19/proxysql-improves-mysql-ssl-connections/
Scalability with ProxySQL –
Connection Multiplexing
• Any application with persistent connection to database
• Java applications to be specific with built in connection pools
Application
Pool
MySQL
• Reduce connections similar to Aurora
• Tested performed with 300K database connections
Application
PoolApplication
Pool
ProxySQL
Advanced Queries with ProxySQL –
Filter ORM useless requests
• PING
• SELECT 1
• USE schemaname
• SET autocommit=0
• ROLLBACK
• SET NAMES
They drastically increase latency
Advanced Queries with ProxySQL –
Filter ORM useless requests
https://www.percona.com/blog/2017/09/01/life360-used-proxysql-lower-database-load/
Hundreds of millions of PINGs per day, down to 0
Scalability with ProxySQL -
Read/Write Split
• On the fly Read / Write implementation
• Use read_only flag to switch traffic
Application
MySQL Master
• Load balancing made easy
MySQL
Slave
Write hostgroups
Read hostgroups MySQL
Slave
Scalability with ProxySQL – User and
schema level sharding
• Granular sharding per username and schema
• Backend pooling based on user activity to specific schema
Application
User A
ProxySQL
• Use advanced sharding to parallelize queries
• Scale beyond the sharding per host limitations.
https://www.percona.com/blog/2016/08/30/mysql-sharding-with-proxysql/
Application
User B
MySQL
Master
MySQL
Slave
MySQL
Master
MySQL
Slave
MySQL
Master
MySQL
Slave
MySQL SlaveMySQL Master
High Availability with ProxySQL –
Seamless failover
• Neither VIP setup nor service discovery needed
• Use read_only flag to switch traffic
Application
Pool
MySQL Master
• Integration with other HA Managers
Application
PoolApplication
Pool
ProxySQL
High Availability with ProxySQL –
Improve Multi DC implementation
• No connection pools latency on SSL connections.
• Costly delays across the water.
MySQL MasterProxySQL
MySQL Master
ProxySQL
Application
DC1
DC2
High Availability with ProxySQL –
Adoption to Clustering
• PXC / Galera / Group Replication MySQL
ProxySQL
•
ProxySQL
Application
Node 1
Application
Application
MySQL
Node 2
MySQL
Node 3
Advanced Queries with ProxySQL –
Caching
• Improve performance on read intensive workloads
• Reduce slave provisioning
Application A
ProxySQL
• Improved query cache over default implementation
• Query aware caching over general caching
Application B
MySQL
Master
MySQL
Slave
MySQL
Slave
MySQL
Slave
Cache
MySQL
Slave
MySQL
Slave
Advanced Queries with ProxySQL –
Query Timeout
• Built in query killer a.k.a query sniper
• Adjustable threshold based on query rule
Application A
ProxySQL
• No idle or long running queries
Application B
MySQL
Master
MySQL
Slave
MySQL
Slave
MySQL
Slave
Query
Timeouts
MySQL
Slave
MySQL
Slave
Advanced Queries with ProxySQL –
Firewall
• Protect database from unwanted traffic
• Stop unwanted user, account , application (new code)
Application A
ProxySQL
• Fast modification to database behavior
• Added protection for DDOS and other attacks.
Application B
Query
Blocking
MySQL
Master
MySQL
Slave
MySQL
Master
MySQL
Slave
MySQL
Master
MySQL
Slave
Advanced Queries with ProxySQL –
Query rewrite engine
• Most wanted feature by DBAs
• Rewrite queries overloading the database on the fly.
Application A
ProxySQL
• Simply buy time until application can be modified
Application B
MySQL
Master
MySQL
Slave
MySQL
Slave
MySQL
Slave
Query
Rewriting
MySQL
Slave
MySQL
Slave
Advanced Queries with ProxySQL –
Query retry
• Server failures or maintenance do not loose a query.
• Fails over and resubmits the query to another host.
Application A
ProxySQL
• Improved operation and new way of handling slaves.
Application B
MySQL
Master
MySQL
Slave
MySQL
Slave
MySQL
Slave
Query
Retry
MySQL
Slave
MySQL
Slave
Advanced Queries with ProxySQL –
Query routing
• Selective routing based on importance.
• Use metrics based on stats_mysql_query_digest and decide
Application A
ProxySQL
• Go beyond read/write split.
Application B
MySQL
Master
MySQL
Slave
MySQL
Slave
MySQL
Slave
Query
Routing
MySQL
Slave
MySQL
Slave
Advanced Queries with ProxySQL –
Query mirroring
• Mirror incoming queries to different back ends
• Use it for audit, analytics, cache warming, benchmarking.
Application A
ProxySQL
Application B
Query
Mirroring
MySQL
Master
Host A
Host B
MySQL
Slave
MySQL
Master
MySQL
Slave
Clickhouse Deployment
APP
APP
APP
Multi-layer ProxySQL at scale
Tested with:
● 8 app servers with 3k clients’ connections each (24k total)
● 4 middle layer proxysqls processing 4k connections each from local
proxysqls (16k total)
● 256 backends/shard (meaning 256 routing rules) processing 600
connections each (150k total)
Single ProxySQL was tested with up to 1MM connections
At today, ProxySQL is able to process up to 750k QPS
Advanced Queries with ProxySQL
Query caching Query Timeout
Query Retry
Query Blocking
Query Routing
and Mirroring
Questions

More Related Content

PPTX
Intro to MySQL Part I
PPTX
Mysql ecosystem in 2018
PDF
Securing your database servers from external attacks
PDF
KubeCon_NA_2021
PDF
How to upgrade like a boss to MySQL 8.0 - PLE19
POTX
Serverless
PDF
Vitess - Data on Kubernetes
PDF
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
Intro to MySQL Part I
Mysql ecosystem in 2018
Securing your database servers from external attacks
KubeCon_NA_2021
How to upgrade like a boss to MySQL 8.0 - PLE19
Serverless
Vitess - Data on Kubernetes
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...

What's hot (20)

PDF
How to shard MariaDB like a pro - FOSDEM 2021
PDF
MySQL Ecosystem in 2020
PPTX
How to upgrade like a boss to my sql 8.0?
PDF
Integrating best of breed open source tools to vitess orchestrator pleu21
PDF
Introduction to Vitess on Kubernetes for MySQL - Webinar
PDF
My First 90 days with Vitess
PPSX
Sharding MySQL with Vitess
PDF
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
PDF
Using MySQL in Automated Testing
PPTX
State of the Container Ecosystem
PDF
Modern MySQL Monitoring and Dashboards.
PPTX
Stratoscale Latest and Greatest
PDF
Developing the Stratoscale System at Scale - Muli Ben-Yehuda, Stratoscale - D...
PPTX
Real time dashboards with Kafka and Druid
PPTX
Scaling DataStax in Docker
PDF
MySQL High Availability Solutions
PPT
MySQL HA Percona cluster @ MySQL meetup Mumbai
PDF
Getting started in the cloud for developers
PDF
Making Cloudy Peanut Butter Cups: Apache CloudStack + Riak CS
PDF
Kubernetes User Group: 維運 Kubernetes 的兩三事
How to shard MariaDB like a pro - FOSDEM 2021
MySQL Ecosystem in 2020
How to upgrade like a boss to my sql 8.0?
Integrating best of breed open source tools to vitess orchestrator pleu21
Introduction to Vitess on Kubernetes for MySQL - Webinar
My First 90 days with Vitess
Sharding MySQL with Vitess
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
Using MySQL in Automated Testing
State of the Container Ecosystem
Modern MySQL Monitoring and Dashboards.
Stratoscale Latest and Greatest
Developing the Stratoscale System at Scale - Muli Ben-Yehuda, Stratoscale - D...
Real time dashboards with Kafka and Druid
Scaling DataStax in Docker
MySQL High Availability Solutions
MySQL HA Percona cluster @ MySQL meetup Mumbai
Getting started in the cloud for developers
Making Cloudy Peanut Butter Cups: Apache CloudStack + Riak CS
Kubernetes User Group: 維運 Kubernetes 的兩三事
Ad

Similar to Proxysql use case scenarios hl++ 2017 (20)

PPTX
Proxysql use case scenarios fosdem17
PPTX
Proxysql use case scenarios plam 2016
PDF
HandsOn ProxySQL Tutorial - PLSC18
PDF
ProxySQL Tutorial - PLAM 2016
PDF
ProxySQL - High Performance and HA Proxy for MySQL
PDF
Fortify aws aurora_proxy
PDF
Fortify aws aurora_proxy_2019_pleu
PPTX
ProxySQL for MySQL
PPTX
A Year in Google - Percona Live Europe 2018
PDF
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
PDF
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
PDF
Proxy SQL 2.0 with PXC
PDF
Database Proxies CRASH COURSE.pdf
PPTX
MySQL High Availability Solutions - Feb 2015 webinar
PPTX
MySQL High Availibility Solutions
PDF
MySQL Proxy. A powerful, flexible MySQL toolbox.
PDF
MySQL's NoSQL -- Texas Linuxfest August 22nd 2015
PDF
MySQL NoSQL APIs
PDF
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
PDF
Percona University - ProxySQL para MySQL
Proxysql use case scenarios fosdem17
Proxysql use case scenarios plam 2016
HandsOn ProxySQL Tutorial - PLSC18
ProxySQL Tutorial - PLAM 2016
ProxySQL - High Performance and HA Proxy for MySQL
Fortify aws aurora_proxy
Fortify aws aurora_proxy_2019_pleu
ProxySQL for MySQL
A Year in Google - Percona Live Europe 2018
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Proxy SQL 2.0 with PXC
Database Proxies CRASH COURSE.pdf
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availibility Solutions
MySQL Proxy. A powerful, flexible MySQL toolbox.
MySQL's NoSQL -- Texas Linuxfest August 22nd 2015
MySQL NoSQL APIs
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
Percona University - ProxySQL para MySQL
Ad

More from Alkin Tezuysal (19)

PDF
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
PDF
Unified Observability - Alkin Tezuysal - FOSSASIA Summit March 2025 .pdf
PDF
Boosting MySQL with Vector Search Scale22X 2025.pdf
PDF
Boosting MySQL with Vector Search Fosdem 2025.pdf
PDF
London MySQL Day - Lightning Talk Dec 2024.pdf
PDF
Design and Modeling with MySQL and PostgreSQL - Percona University Istanbul S...
PDF
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
PPTX
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
PDF
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdf
PDF
How OLTP to OLAP Archival Demystified
PDF
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
PDF
My first 90 days with ClickHouse.pdf
PDF
When is Myrocks good? 2020 Webinar Series
PPTX
Mysql 8 vs Mariadb 10.4 Webinar 2020 Feb
PPTX
Myrocks in the wild wild west! FOSDEM 2020
PPTX
Mysql 8 vs Mariadb 10.4 Highload++ 2019
PPTX
When is MyRocks good?
PPTX
Mysql ecosystem in 2019
PDF
PXC (Xtradb) Failure and Recovery
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Unified Observability - Alkin Tezuysal - FOSSASIA Summit March 2025 .pdf
Boosting MySQL with Vector Search Scale22X 2025.pdf
Boosting MySQL with Vector Search Fosdem 2025.pdf
London MySQL Day - Lightning Talk Dec 2024.pdf
Design and Modeling with MySQL and PostgreSQL - Percona University Istanbul S...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdf
How OLTP to OLAP Archival Demystified
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
My first 90 days with ClickHouse.pdf
When is Myrocks good? 2020 Webinar Series
Mysql 8 vs Mariadb 10.4 Webinar 2020 Feb
Myrocks in the wild wild west! FOSDEM 2020
Mysql 8 vs Mariadb 10.4 Highload++ 2019
When is MyRocks good?
Mysql ecosystem in 2019
PXC (Xtradb) Failure and Recovery

Recently uploaded (20)

PDF
Categorization of Factors Affecting Classification Algorithms Selection
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PPTX
Management Information system : MIS-e-Business Systems.pptx
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PPTX
Fundamentals of Mechanical Engineering.pptx
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PDF
737-MAX_SRG.pdf student reference guides
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PPTX
Software Engineering and software moduleing
PPT
Total quality management ppt for engineering students
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PPTX
introduction to high performance computing
Categorization of Factors Affecting Classification Algorithms Selection
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
Management Information system : MIS-e-Business Systems.pptx
distributed database system" (DDBS) is often used to refer to both the distri...
Fundamentals of Mechanical Engineering.pptx
Fundamentals of safety and accident prevention -final (1).pptx
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
Automation-in-Manufacturing-Chapter-Introduction.pdf
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
737-MAX_SRG.pdf student reference guides
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
Software Engineering and software moduleing
Total quality management ppt for engineering students
"Array and Linked List in Data Structures with Types, Operations, Implementat...
August 2025 - Top 10 Read Articles in Network Security & Its Applications
introduction to high performance computing

Proxysql use case scenarios hl++ 2017

  • 1. ProxySQL Use Case Scenarios HighLoad++ Nov 7-8 2017 Alkin Tezuysal
  • 2. Who we are • Alkin Tezuysal Sr. Technical Manager, Percona @ask_dba, https://www.linkedin.com/in/askdba/ • René Cannaò MySQL SRE, Dropbox / ProxySQL @proxysql
  • 4. Other Sessions • 156. Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Developers / Rene Cannao (ProxySQL) • 273. ProxySQL, MaxScale, MySQL Router and other database traffic managers / Petr Zaitsev (Percona)
  • 5. Top 5 reasons to use ProxySQL • Improve database operations. • Understand and solve performance issues. • Create a proxy layer to shield the database. • Add High-Availability to database topology. • Empower the DBAs with great tool.
  • 6. ProxySQL Highlights Scalability High Availability Advanced Query Support Manageability
  • 7. Use case overview - Scalability Connection Pooling and Multiplexing Add connection pooling layer Reduce connection thread overhead Read / Write Split More scalability for any MySQL topology Must for any heavy workloads Read / Write Sharding Effortless sharding implementation Without Dev. support and cost savings
  • 8. Use case overview - High Availability Seamless Failover Gracef ul failover support Query rerouting Load Balancing Allows easy scaling For better utilization of servers Cluster Aware Supports PXC/Galera implementations Small footprint for big gain
  • 9. Use case overview - Advanced Queries Query caching Cache frequently used data Adds another cache layer Query rewrite Add SQL flexibility Faster problem solving Query blocking Add database aware firewall Without App. support
  • 10. Use case overview - Advanced Queries Query mirroring Audit, Analyze, Review, Cache Warming Allow benchmarking on live data Query throttling Set prioritization for important queries Allows manual intervention to problem queries Query timeout Add another timeout layer Flexible query level timeout
  • 11. Use case overview - Manageability Admin Utility Authentication support Limit user access to database pool Runtime reconfiguration On the fly modifications Configure database without restart or downtime Monitoring Stats collection and reporting Investigate database workload
  • 12. Scalability with ProxySQL - Connection Pooling • Any application without persistent connection to database • PHP applications to be specific without built in connection pool Application MySQLProxySQL • Reduces number of new connections to the database
  • 13. Scalability with ProxySQL - Connection Pooling and SSL https://www.percona.com/blog/2017/09/19/proxysql-improves-mysql-ssl-connections/
  • 14. Scalability with ProxySQL – Connection Multiplexing • Any application with persistent connection to database • Java applications to be specific with built in connection pools Application Pool MySQL • Reduce connections similar to Aurora • Tested performed with 300K database connections Application PoolApplication Pool ProxySQL
  • 15. Advanced Queries with ProxySQL – Filter ORM useless requests • PING • SELECT 1 • USE schemaname • SET autocommit=0 • ROLLBACK • SET NAMES They drastically increase latency
  • 16. Advanced Queries with ProxySQL – Filter ORM useless requests https://www.percona.com/blog/2017/09/01/life360-used-proxysql-lower-database-load/ Hundreds of millions of PINGs per day, down to 0
  • 17. Scalability with ProxySQL - Read/Write Split • On the fly Read / Write implementation • Use read_only flag to switch traffic Application MySQL Master • Load balancing made easy MySQL Slave Write hostgroups Read hostgroups MySQL Slave
  • 18. Scalability with ProxySQL – User and schema level sharding • Granular sharding per username and schema • Backend pooling based on user activity to specific schema Application User A ProxySQL • Use advanced sharding to parallelize queries • Scale beyond the sharding per host limitations. https://www.percona.com/blog/2016/08/30/mysql-sharding-with-proxysql/ Application User B MySQL Master MySQL Slave MySQL Master MySQL Slave MySQL Master MySQL Slave
  • 19. MySQL SlaveMySQL Master High Availability with ProxySQL – Seamless failover • Neither VIP setup nor service discovery needed • Use read_only flag to switch traffic Application Pool MySQL Master • Integration with other HA Managers Application PoolApplication Pool ProxySQL
  • 20. High Availability with ProxySQL – Improve Multi DC implementation • No connection pools latency on SSL connections. • Costly delays across the water. MySQL MasterProxySQL MySQL Master ProxySQL Application DC1 DC2
  • 21. High Availability with ProxySQL – Adoption to Clustering • PXC / Galera / Group Replication MySQL ProxySQL • ProxySQL Application Node 1 Application Application MySQL Node 2 MySQL Node 3
  • 22. Advanced Queries with ProxySQL – Caching • Improve performance on read intensive workloads • Reduce slave provisioning Application A ProxySQL • Improved query cache over default implementation • Query aware caching over general caching Application B MySQL Master MySQL Slave MySQL Slave MySQL Slave Cache MySQL Slave MySQL Slave
  • 23. Advanced Queries with ProxySQL – Query Timeout • Built in query killer a.k.a query sniper • Adjustable threshold based on query rule Application A ProxySQL • No idle or long running queries Application B MySQL Master MySQL Slave MySQL Slave MySQL Slave Query Timeouts MySQL Slave MySQL Slave
  • 24. Advanced Queries with ProxySQL – Firewall • Protect database from unwanted traffic • Stop unwanted user, account , application (new code) Application A ProxySQL • Fast modification to database behavior • Added protection for DDOS and other attacks. Application B Query Blocking MySQL Master MySQL Slave MySQL Master MySQL Slave MySQL Master MySQL Slave
  • 25. Advanced Queries with ProxySQL – Query rewrite engine • Most wanted feature by DBAs • Rewrite queries overloading the database on the fly. Application A ProxySQL • Simply buy time until application can be modified Application B MySQL Master MySQL Slave MySQL Slave MySQL Slave Query Rewriting MySQL Slave MySQL Slave
  • 26. Advanced Queries with ProxySQL – Query retry • Server failures or maintenance do not loose a query. • Fails over and resubmits the query to another host. Application A ProxySQL • Improved operation and new way of handling slaves. Application B MySQL Master MySQL Slave MySQL Slave MySQL Slave Query Retry MySQL Slave MySQL Slave
  • 27. Advanced Queries with ProxySQL – Query routing • Selective routing based on importance. • Use metrics based on stats_mysql_query_digest and decide Application A ProxySQL • Go beyond read/write split. Application B MySQL Master MySQL Slave MySQL Slave MySQL Slave Query Routing MySQL Slave MySQL Slave
  • 28. Advanced Queries with ProxySQL – Query mirroring • Mirror incoming queries to different back ends • Use it for audit, analytics, cache warming, benchmarking. Application A ProxySQL Application B Query Mirroring MySQL Master Host A Host B MySQL Slave MySQL Master MySQL Slave
  • 30. Multi-layer ProxySQL at scale Tested with: ● 8 app servers with 3k clients’ connections each (24k total) ● 4 middle layer proxysqls processing 4k connections each from local proxysqls (16k total) ● 256 backends/shard (meaning 256 routing rules) processing 600 connections each (150k total) Single ProxySQL was tested with up to 1MM connections At today, ProxySQL is able to process up to 750k QPS
  • 31. Advanced Queries with ProxySQL Query caching Query Timeout Query Retry Query Blocking Query Routing and Mirroring