Successfully reported this slideshow.
Your SlideShare is downloading. ×

Webinar slides: MySQL & MariaDB load balancing with ProxySQL & ClusterControl: introduction webinar

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 38 Ad

Webinar slides: MySQL & MariaDB load balancing with ProxySQL & ClusterControl: introduction webinar

Download to read offline

Proxies are building blocks of HA setups for MySQL & MariaDB. They can detect failed nodes and route queries to hosts which are still available. If your master failed and you had to promote one of your slaves, proxies will detect such topology changes and route your traffic accordingly. More advanced proxies can do much more: route traffic based on precise query rules, cache queries or mirror them. They can be even used to implement different types of sharding.

Introducing ProxySQL!

In this joint webinar with ProxySQL’s creator, René Cannaò, we discuss this new proxy and its key features. We show you how you can deploy ProxySQL using ClusterControl. And we give you an early walk-through of some of the exciting ClusterControl features for ProxySQL that we have planned for its next release.


AGENDA

1. Introduction
2. ProxySQL concepts (René Cannaò)
- Hostgroups
- Query rules
- Connection multiplexing
- Configuration management
3. Demo of ProxySQL setup in ClusterControl (Krzysztof Książek)
4. Upcoming ClusterControl features for ProxySQL


SPEAKERS

René Cannaò, Creator & Founder, ProxySQL. René has 10 years of working experience as a System, Network and Database Administrator mainly on Linux/Unix platform. In the last 4-5 years his experience was focused mainly on MySQL, working as Senior MySQL Support Engineer at Sun/Oracle and then as Senior Operational DBA at Blackbird, (formerly PalominoDB). In this period he built an analytic and problem solving mindset and he is always eager to take on new challenges, especially if they are related to high performance. And then he created ProxySQL…

Krzysztof Książek, Senior Support Engineer at Severalnines, is a MySQL DBA with experience managing complex database environments for companies like Zendesk, Chegg, Pinterest and Flipboard.

Proxies are building blocks of HA setups for MySQL & MariaDB. They can detect failed nodes and route queries to hosts which are still available. If your master failed and you had to promote one of your slaves, proxies will detect such topology changes and route your traffic accordingly. More advanced proxies can do much more: route traffic based on precise query rules, cache queries or mirror them. They can be even used to implement different types of sharding.

Introducing ProxySQL!

In this joint webinar with ProxySQL’s creator, René Cannaò, we discuss this new proxy and its key features. We show you how you can deploy ProxySQL using ClusterControl. And we give you an early walk-through of some of the exciting ClusterControl features for ProxySQL that we have planned for its next release.


AGENDA

1. Introduction
2. ProxySQL concepts (René Cannaò)
- Hostgroups
- Query rules
- Connection multiplexing
- Configuration management
3. Demo of ProxySQL setup in ClusterControl (Krzysztof Książek)
4. Upcoming ClusterControl features for ProxySQL


SPEAKERS

René Cannaò, Creator & Founder, ProxySQL. René has 10 years of working experience as a System, Network and Database Administrator mainly on Linux/Unix platform. In the last 4-5 years his experience was focused mainly on MySQL, working as Senior MySQL Support Engineer at Sun/Oracle and then as Senior Operational DBA at Blackbird, (formerly PalominoDB). In this period he built an analytic and problem solving mindset and he is always eager to take on new challenges, especially if they are related to high performance. And then he created ProxySQL…

Krzysztof Książek, Senior Support Engineer at Severalnines, is a MySQL DBA with experience managing complex database environments for companies like Zendesk, Chegg, Pinterest and Flipboard.

Advertisement
Advertisement

More Related Content

Slideshows for you (19)

Viewers also liked (15)

Advertisement

Similar to Webinar slides: MySQL & MariaDB load balancing with ProxySQL & ClusterControl: introduction webinar (20)

More from Severalnines (20)

Advertisement

Recently uploaded (20)

Webinar slides: MySQL & MariaDB load balancing with ProxySQL & ClusterControl: introduction webinar

  1. 1. Copyright 2017 Severalnines AB 1 Your host & some logistics I'm Jean-Jérôme from the Severalnines Team and I'm your host for today's webinar! Feel free to ask any questions in the Questions section of this application or via the Chat box. You can also contact me directly via the chat box or via email: jj@severalnines.com during or after the webinar.
  2. 2. Copyright 2017 Severalnines AB 2 About Severalnines and ClusterControl
  3. 3. Copyright 2017 Severalnines AB 3 What we do Manage Scale MonitorDeploy
  4. 4. Copyright 2017 Severalnines AB 4 ClusterControl Automation & Management ! Provisioning ! Deploy a cluster in minutes ! On-premises or in the cloud (AWS) ! Monitoring ! Systems view ! 1sec resolution ! DB / OS stats & performance advisors ! Configurable dashboards ! Query Analyzer ! Real-time / historical ! Management ! Multi cluster/data-center ! Automate repair/recovery ! Database upgrades ! Backups ! Configuration management ! Cloning ! One-click scaling
  5. 5. Copyright 2017 Severalnines AB 5 Supported Databases
  6. 6. Copyright 2017 Severalnines AB 6 Customers
  7. 7. Copyright 2017 Severalnines AB MySQL & MariaDB load balancing with ProxySQL & ClusterControl: introduction webinar February 28, 2017 Krzysztof Książek Severalnines krzysztof@severalnines.com René Cannaò ProxySQL rene@proxysql.com 7
  8. 8. Copyright 2017 Severalnines AB 8 Agenda
  9. 9. Copyright 2017 Severalnines AB 9 Agenda ! ProxySQL - introduction ! ProxySQL Internals ! Failover with ProxySQL ! Demo of ProxySQL support in ClusterControl
  10. 10. Copyright 2017 Severalnines AB 10 ProxySQL - introduction
  11. 11. Copyright 2017 Severalnines AB 11 Main motivations ! empower the DBAs ! improve operation ! understand and improve performance ! create a proxy layer to shield the database ! High performance and High Availability
  12. 12. Copyright 2017 Severalnines AB 12 ! on-the-fly rewrite of queries ! caching reads outside the database server ! connection pooling and multiplexing ! complex query routing and read/write split ! load balancing ! real time statistics ! monitoring ProxySQL Features ! High Availability and Scalability ! seamless failover ! firewall ! query throttling ! query timeout ! query mirroring ! runtime reconfiguration
  13. 13. Copyright 2017 Severalnines AB 13 Hostgroups and Query Routing ! All backends are grouped into hostgroups ! Hostgroups have logical functionalities
  14. 14. Copyright 2017 Severalnines AB 14 Basic design
  15. 15. Copyright 2017 Severalnines AB 15 ! HostGroup0 (HG0): Write masters ! HostGroup1( HG1): Read slaves ! Read/Write split Example of hostgroup setups ! HG0: main write masters ! HG1: main read slaves ! HG2: reporting slaves ! HG3: ad-hoc queries slaves ! HG4: data warehouse write masters ! HG5: data warehouse read slaves ! HG6: remote site servers ! HG7: test servers ! HG8 : mirror for traffic on HG0 ! HG9 : mirror for traffic on HG1
  16. 16. Copyright 2017 Severalnines AB 16 Basic design
  17. 17. Copyright 2017 Severalnines AB 17 Basic design
  18. 18. Copyright 2017 Severalnines AB 18 Clustered ProxySQL Architecture
  19. 19. Copyright 2017 Severalnines AB 19 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 ! As today, ProxySQL is able to process up to 750k QPS
  20. 20. Copyright 2017 Severalnines AB 20 ProxySQL Internals
  21. 21. Copyright 2017 Severalnines AB 21 ProxySQL Modules
  22. 22. Copyright 2017 Severalnines AB 22 Queries Processor ! Based on Queries Rules ! Defines what to cache ! Defines the hostgroup target ! Timeout/delay ! Firewall ! Mirroring ! Rewrite queries
  23. 23. Copyright 2017 Severalnines AB 23 ! Complex rules to match incoming traffic: ! regex on query ! regex on digest text ! username ! schemaname Queries rules ! Complex rules to match incoming traffic: ! Source IP address ! Bind IP address/port ! digest ! Rules can be chained
  24. 24. Copyright 2017 Severalnines AB 24 ! Caching on the wire ! Internal key/value storage ! In memory only ! Pattern based ! Expired by timeout Queries Cache and Rewrite ! Rewrite on the wire ! Regex match/replace on query on digest text ! Optionally cached or mirrored
  25. 25. Copyright 2017 Severalnines AB 25 User Authentication ! Credentials stored in the proxy ! User login always possible (even without backends) ! Max connections ! Login credentials are encrypted
  26. 26. Copyright 2017 Severalnines AB 26 Hostgroups Manager ! Management of servers ! Track servers status ! Tightly integrated with the connections pool
  27. 27. Copyright 2017 Severalnines AB 27 Connection Pool ! Reduced the overhead of creating new connections, and are recycled when not in use ! One to many connections ! Multiplexing & maximum connections ! Auto-reconnect and automatic re-execution of queries ! Failover management
  28. 28. Copyright 2017 Severalnines AB 28 Auto-reconnect and re-execution ! Automatic detection of failures ! Graceful handling ! Auto-reconnect when possible ! Pause until a backend becomes available ! Re-execution of queries
  29. 29. Copyright 2017 Severalnines AB 29 Multiplexing ! Reduce the number of connections against mysqld (configurable) ! Many clients connections (tens of thousands) can use few backend connections (few hundreds) ! Tracks connection status (transactions, user variables, temporary tables, etc) ! Order by waiting time
  30. 30. Copyright 2017 Severalnines AB 30 Monitoring Module ! It monitors backends and collects metrics ! Monitors replication lag and shun hosts ! Monitors read_only variables (replication hostgroups) ! Ping and terminates unresponsive nodes
  31. 31. Copyright 2017 Severalnines AB 31 Failover with ProxySQL
  32. 32. Copyright 2017 Severalnines AB 32 Failover ! 2 phases process: ! remove host ! add host ! Seamless switchover: ! https://severalnines.com/blog/how-proxysql-adds-failover-and-query-control-your-mysql-replication-setup ! http://proxysql.blogspot.com/2015/09/proxysql-tutorial-seamless-replication.html ! Managed by external process ! Switchover in less than 1 second
  33. 33. Copyright 2017 Severalnines AB 33 Distributed failover ! Multiple ProxySQL are available in a network ! Failover managed by an external process that: ! remove host from each ProxySQL instance ! add new host into each ProxySQL instance ! Manager is not part of ProxySQL. ! ClusterControl can be used to detect master failure and perform a failover
  34. 34. Copyright 2017 Severalnines AB 34 Replication hostgroups ! Constantly monitor read_only variable ! Defines replication topology as writer(s)/readers(s) ! Automatically re-assign servers to the right hostgroup ! Possible to define unlimited number of replication clusters
  35. 35. Copyright 2017 Severalnines AB 35 Master switch with ClusterControl and ProxySQL
  36. 36. Copyright 2017 Severalnines AB 36 Failover highlight ! improve failover time as perceived by the application ! prevent errors sent to the application ! perform transparent database failovers: gracefully redirecting traffic without the application knowing ! existing applications do not have to be rewritten to autoreconnect since connections are not lost from failovers
  37. 37. Copyright 2017 Severalnines AB 37 Demo
  38. 38. Copyright 2017 Severalnines AB 38 Thank You! ! Severalnines resources on ProxySQL ! https://severalnines.com/blog/using-clustercontrol-deploy-and-configure-proxysql-top-mysql-replication ! https://severalnines.com/blog/sharding-mysql-mysql-fabric-and-proxysql ! https://severalnines.com/blog/how-proxysql-adds-failover-and-query-control-your-mysql-replication-setup ! https://severalnines.com/blog/how-set-read-write-split-galera-cluster-using-proxysql ! Install ClusterControl: ! https://severalnines.com/download-clustercontrol-database-management-system ! Contact: jj@severalnines.com

×