SlideShare une entreprise Scribd logo
1  sur  28
ProxySQL Use Case
Scenarios
Percona Live Amsterdam Oct 3-5 2016
Alkin Tezuysal
René Cannaò
2
Who we are
• Alkin Tezuysal
Sr. Technical Manager, Percona
@ask_dba
• René Cannaò
MySQL SRE, Dropbox / ProxySQL
@proxysql
3
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.
4
ProxySQL Highlights
Scalability High Availability
Advanced Query
Support
Manageability
5
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
6
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
7
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
8
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
9
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
10
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
11
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
• Testing being performed for 300K database connections
Application
Pool
Application
Pool
ProxySQL
12
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
13
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.
Application
User B
MySQL
Master
MySQL
Slave
MySQL
Master
MySQL
Slave
MySQL
Master
MySQL
Slave
14
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
Pool
Application
Pool
ProxySQL
15
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
16
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
17
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
18
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
19
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
20
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
21
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
22
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
23
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
24
Advanced Queries with ProxySQL
Query caching Query Timeout
Query Retry
Query Blocking
Query Routing
and Mirroring
25
Clustered 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 150k connections
At today, ProxySQL is able to process up to 750k QPS
26
Questions
2
7
Rate Our Session!
DATABASE
PERFORMANCE
MATTERS

Contenu connexe

Tendances

Nginx - Tips and Tricks.
Nginx - Tips and Tricks.Nginx - Tips and Tricks.
Nginx - Tips and Tricks.
Harish S
 
Plny12 galera-cluster-best-practices
Plny12 galera-cluster-best-practicesPlny12 galera-cluster-best-practices
Plny12 galera-cluster-best-practices
Dimas Prasetyo
 

Tendances (19)

ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
 
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in PinterestHBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
hbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecturehbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecture
 
MongoDB performance
MongoDB performanceMongoDB performance
MongoDB performance
 
Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best PracticesEvolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best Practices
 
Troubleshooting redis
Troubleshooting redisTroubleshooting redis
Troubleshooting redis
 
Nginx - Tips and Tricks.
Nginx - Tips and Tricks.Nginx - Tips and Tricks.
Nginx - Tips and Tricks.
 
MaxScale - The Pluggable Router
MaxScale - The Pluggable RouterMaxScale - The Pluggable Router
MaxScale - The Pluggable Router
 
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei
hbaseconasia2017: HBase Disaster Recovery Solution at Huaweihbaseconasia2017: HBase Disaster Recovery Solution at Huawei
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei
 
Plny12 galera-cluster-best-practices
Plny12 galera-cluster-best-practicesPlny12 galera-cluster-best-practices
Plny12 galera-cluster-best-practices
 
MySQL Shell for Database Engineers
MySQL Shell for Database EngineersMySQL Shell for Database Engineers
MySQL Shell for Database Engineers
 
Introduction to Galera Cluster
Introduction to Galera ClusterIntroduction to Galera Cluster
Introduction to Galera Cluster
 
Intro ProxySQL
Intro ProxySQLIntro ProxySQL
Intro ProxySQL
 
Load balancing at tuenti
Load balancing at tuentiLoad balancing at tuenti
Load balancing at tuenti
 
Postgres connections at scale
Postgres connections at scalePostgres connections at scale
Postgres connections at scale
 
Using advanced options in MariaDB Connector/J
Using advanced options in MariaDB Connector/JUsing advanced options in MariaDB Connector/J
Using advanced options in MariaDB Connector/J
 
Maria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityMaria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High Availability
 
Proxysql use case scenarios fosdem17
Proxysql use case scenarios    fosdem17Proxysql use case scenarios    fosdem17
Proxysql use case scenarios fosdem17
 

En vedette

Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityRamp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Pythian
 
MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016
Wagner Bianchi
 

En vedette (13)

Yahoo: Experiences with MySQL GTID and Multi Threaded Replication
Yahoo: Experiences with MySQL GTID and Multi Threaded ReplicationYahoo: Experiences with MySQL GTID and Multi Threaded Replication
Yahoo: Experiences with MySQL GTID and Multi Threaded Replication
 
Ansible MySQL MHA
Ansible MySQL MHAAnsible MySQL MHA
Ansible MySQL MHA
 
SLQ vs NOSQL - friends or foes
SLQ vs NOSQL - friends or foes SLQ vs NOSQL - friends or foes
SLQ vs NOSQL - friends or foes
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL Secrets
 
Mix ‘n’ Match Async and Group Replication for Advanced Replication Setups
Mix ‘n’ Match Async and Group Replication for Advanced Replication SetupsMix ‘n’ Match Async and Group Replication for Advanced Replication Setups
Mix ‘n’ Match Async and Group Replication for Advanced Replication Setups
 
Performance schema and sys schema
Performance schema and sys schemaPerformance schema and sys schema
Performance schema and sys schema
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
 
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityRamp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
 
Galene - LinkedIn's Search Architecture: Presented by Diego Buthay & Sriram S...
Galene - LinkedIn's Search Architecture: Presented by Diego Buthay & Sriram S...Galene - LinkedIn's Search Architecture: Presented by Diego Buthay & Sriram S...
Galene - LinkedIn's Search Architecture: Presented by Diego Buthay & Sriram S...
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance Schema
 
MySQL 5.6 GTID in a nutshell
MySQL 5.6 GTID in a nutshellMySQL 5.6 GTID in a nutshell
MySQL 5.6 GTID in a nutshell
 
MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016
 
Using Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query PerformanceUsing Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query Performance
 

Similaire à Proxysql use case scenarios plam 2016

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
 
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Continuent
 

Similaire à Proxysql use case scenarios plam 2016 (20)

Proxysql use case scenarios hl++ 2017
Proxysql use case scenarios    hl++ 2017 Proxysql use case scenarios    hl++ 2017
Proxysql use case scenarios hl++ 2017
 
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 ...
 
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
 
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
 
A Tour of Azure SQL Databases (NOVA SQL UG 2020)
A Tour of Azure SQL Databases  (NOVA SQL UG 2020)A Tour of Azure SQL Databases  (NOVA SQL UG 2020)
A Tour of Azure SQL Databases (NOVA SQL UG 2020)
 
Introduction to MariaDB MaxScale
Introduction to MariaDB MaxScaleIntroduction to MariaDB MaxScale
Introduction to MariaDB MaxScale
 
Azure Data services
Azure Data servicesAzure Data services
Azure Data services
 
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
 
Webinar Slides: Multi-Region AWS Aurora vs Continuent Tungsten for MySQL & Ma...
Webinar Slides: Multi-Region AWS Aurora vs Continuent Tungsten for MySQL & Ma...Webinar Slides: Multi-Region AWS Aurora vs Continuent Tungsten for MySQL & Ma...
Webinar Slides: Multi-Region AWS Aurora vs Continuent Tungsten for MySQL & Ma...
 
MySQL Intro JSON NoSQL
MySQL Intro JSON NoSQLMySQL Intro JSON NoSQL
MySQL Intro JSON NoSQL
 
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
 
Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overview
 
Scaling MySQL -- Swanseacon.co.uk
Scaling MySQL -- Swanseacon.co.uk Scaling MySQL -- Swanseacon.co.uk
Scaling MySQL -- Swanseacon.co.uk
 
What's New and Noteworthy on Oracle CAF 12.1.3
What's New and Noteworthy on Oracle CAF 12.1.3What's New and Noteworthy on Oracle CAF 12.1.3
What's New and Noteworthy on Oracle CAF 12.1.3
 
Better, faster, cheaper infrastructure with apache cloud stack and riak cs redux
Better, faster, cheaper infrastructure with apache cloud stack and riak cs reduxBetter, faster, cheaper infrastructure with apache cloud stack and riak cs redux
Better, faster, cheaper infrastructure with apache cloud stack and riak cs redux
 
My sql
My sqlMy sql
My sql
 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyMySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
 
high performance databases
high performance databaseshigh performance databases
high performance databases
 
Netherlands Tech Tour 02 - MySQL Fabric
Netherlands Tech Tour 02 -   MySQL FabricNetherlands Tech Tour 02 -   MySQL Fabric
Netherlands Tech Tour 02 - MySQL Fabric
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16
 

Plus de Alkin Tezuysal

Integrating best of breed open source tools to vitess orchestrator pleu21
Integrating best of breed open source tools to vitess  orchestrator   pleu21Integrating best of breed open source tools to vitess  orchestrator   pleu21
Integrating best of breed open source tools to vitess orchestrator pleu21
Alkin Tezuysal
 

Plus de Alkin Tezuysal (20)

Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
 
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdf
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdfFOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdf
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdf
 
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
 
How OLTP to OLAP Archival Demystified
How OLTP to OLAP Archival DemystifiedHow OLTP to OLAP Archival Demystified
How OLTP to OLAP Archival Demystified
 
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
 
My first 90 days with ClickHouse.pdf
My first 90 days with ClickHouse.pdfMy first 90 days with ClickHouse.pdf
My first 90 days with ClickHouse.pdf
 
KubeCon_NA_2021
KubeCon_NA_2021KubeCon_NA_2021
KubeCon_NA_2021
 
Integrating best of breed open source tools to vitess orchestrator pleu21
Integrating best of breed open source tools to vitess  orchestrator   pleu21Integrating best of breed open source tools to vitess  orchestrator   pleu21
Integrating best of breed open source tools to vitess orchestrator pleu21
 
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
Vitess: Scalable Database Architecture -  Kubernetes Community Days Africa Ap...Vitess: Scalable Database Architecture -  Kubernetes Community Days Africa Ap...
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
 
How to shard MariaDB like a pro - FOSDEM 2021
How to shard MariaDB like a pro  - FOSDEM 2021How to shard MariaDB like a pro  - FOSDEM 2021
How to shard MariaDB like a pro - FOSDEM 2021
 
Vitess - Data on Kubernetes
Vitess -  Data on Kubernetes  Vitess -  Data on Kubernetes
Vitess - Data on Kubernetes
 
MySQL Ecosystem in 2020
MySQL Ecosystem in 2020MySQL Ecosystem in 2020
MySQL Ecosystem in 2020
 
Introduction to Vitess on Kubernetes for MySQL - Webinar
Introduction to Vitess on Kubernetes for MySQL -  WebinarIntroduction to Vitess on Kubernetes for MySQL -  Webinar
Introduction to Vitess on Kubernetes for MySQL - Webinar
 
When is Myrocks good? 2020 Webinar Series
When is Myrocks good? 2020 Webinar SeriesWhen is Myrocks good? 2020 Webinar Series
When is Myrocks good? 2020 Webinar Series
 
Mysql 8 vs Mariadb 10.4 Webinar 2020 Feb
Mysql 8 vs Mariadb 10.4 Webinar 2020 FebMysql 8 vs Mariadb 10.4 Webinar 2020 Feb
Mysql 8 vs Mariadb 10.4 Webinar 2020 Feb
 
Myrocks in the wild wild west! FOSDEM 2020
Myrocks in the wild wild west! FOSDEM 2020Myrocks in the wild wild west! FOSDEM 2020
Myrocks in the wild wild west! FOSDEM 2020
 
Mysql 8 vs Mariadb 10.4 Highload++ 2019
Mysql 8 vs Mariadb 10.4 Highload++ 2019Mysql 8 vs Mariadb 10.4 Highload++ 2019
Mysql 8 vs Mariadb 10.4 Highload++ 2019
 
When is MyRocks good?
When is MyRocks good? When is MyRocks good?
When is MyRocks good?
 
How to upgrade like a boss to MySQL 8.0 - PLE19
How to upgrade like a boss to MySQL 8.0 -  PLE19How to upgrade like a boss to MySQL 8.0 -  PLE19
How to upgrade like a boss to MySQL 8.0 - PLE19
 

Dernier

VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
Diya Sharma
 

Dernier (20)

Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceReal Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 

Proxysql use case scenarios plam 2016

  • 1. ProxySQL Use Case Scenarios Percona Live Amsterdam Oct 3-5 2016 Alkin Tezuysal René Cannaò
  • 2. 2 Who we are • Alkin Tezuysal Sr. Technical Manager, Percona @ask_dba • René Cannaò MySQL SRE, Dropbox / ProxySQL @proxysql
  • 3. 3 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.
  • 4. 4 ProxySQL Highlights Scalability High Availability Advanced Query Support Manageability
  • 5. 5 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
  • 6. 6 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
  • 7. 7 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
  • 8. 8 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
  • 9. 9 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
  • 10. 10 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
  • 11. 11 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 • Testing being performed for 300K database connections Application Pool Application Pool ProxySQL
  • 12. 12 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
  • 13. 13 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. Application User B MySQL Master MySQL Slave MySQL Master MySQL Slave MySQL Master MySQL Slave
  • 14. 14 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 Pool Application Pool ProxySQL
  • 15. 15 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
  • 16. 16 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
  • 17. 17 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
  • 18. 18 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
  • 19. 19 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
  • 20. 20 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
  • 21. 21 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
  • 22. 22 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
  • 23. 23 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
  • 24. 24 Advanced Queries with ProxySQL Query caching Query Timeout Query Retry Query Blocking Query Routing and Mirroring
  • 25. 25 Clustered 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 150k connections At today, ProxySQL is able to process up to 750k QPS