Top Banner
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: [email protected] during or after the webinar.
39

Webinar slides: High Availability in ProxySQL

Apr 12, 2017

Download

Internet

Severalnines
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Webinar slides: High Availability in ProxySQL

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: [email protected] during or after the webinar.

Page 2: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

2

About Severalnines and ClusterControl

Page 3: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

3

What we do

Manage Scale

Monitor Deploy

Page 4: Webinar slides: High Availability in ProxySQL

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

Page 5: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

5

Supported Databases

Page 6: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

6

Customers

Page 7: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

High Availability in ProxySQL

April 4, 2017

Krzysztof Książek

Severalnines

[email protected]

René Cannaò

ProxySQL

[email protected]

7

Page 8: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

8

Agenda

Page 9: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

9

Agenda

! HA setups for ProxySQL

! ProxySQL Distributed configuration

! Demo of ProxySQL HA deployment in ClusterControl

Page 10: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

10

HA setups for ProxySQL

Page 11: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

11

One single ProxySQL instance

Page 12: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

12

One single ProxySQL instance

! Simple setup

! Single point of failure

! Not suitable for Production

Page 13: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

13

Improve resilience on single ProxySQL host

! Automatic restart on failure

! built-in feature

! systemd / supervisord / others

! Multiple ProxySQL instances on single port

! requires kernel >= 3.9

Page 14: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

14

Multiple ProxySQL hosts

Page 15: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

15

Multiple dedicated ProxySQL hosts

! Requires load-balancing in the application

! or built-in in the driver

! Load balancer on top of ProxySQL

Page 16: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

16

Multiple ProxySQL hosts

Page 17: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

17

One ProxySQL instance per application server

Page 18: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

18

One ProxySQL instance per application server

! No single point of failure

! Each application server has one proxy

! No need for load balancer

! It scales to hundreds of nodes

! No possibility to share cache

Page 19: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

19

Silos approach

Page 20: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

20

Silos approach

! Reduced the number of ProxySQL instances

! No need for load balancer

! It scales to hundreds of nodes

! More efficient uses of resources

Page 21: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

21

Keepalived + VIP

VIP

Page 22: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

22

Keepalived + VIP + LB

VIP

Page 23: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

23

Keepalived + VIP + LVS

VIP

Page 24: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

24

Multi-layer + Keepalived + VIP + LVS

VIP

Page 25: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

25

Multi-layers

Page 26: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

26

Silos + Multi-layers

Page 27: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

27

Combine multiple technologies

! Automatic restart

! Multiple instances on same ports

! Silos

! Multi-layers

! Keepalived

Page 28: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

28

KISS principle

! Keep it simple, stupid

! Find the best solution for your setup

Page 29: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

ProxySQL Distributed configuration

29

Page 30: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

30

Distributed configuration

! Not built-in yet

! Configuration managed externally

! Infrastructure orchestration tools

! Scripts

! Failover management tools

Page 31: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

31

Configuration file

! Easy to read

! No input validation

! No rollback

! Useful for bootstrap

! Ignored if database file is present

Page 32: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

32

Admin interface and database config file

! Embedded SQLite database

! Input validation

! 3 configuration layers

! Configurable remotely

! Accessible by any tool able to send SQL queries

! Export metrics and allows joins

Page 33: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

33

Admin interface - automatic failover

! ProxySQL Monitor

! ClusterControl : https://severalnines.com/product/clustercontrol

! Orchestrator : https://github.com/github/orchestrator

! MHA : https://github.com/yoshinorim/mha4mysql-manager

! ProxySQL Scheduler

Page 34: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

34

Admin interface - configuration

! ClusterControl : https://severalnines.com/product/clustercontrol

! proxysql-admin : https://github.com/percona/proxysql-admin-tool

! Ansible : https://github.com/bmildren/ansible/tree/proxysql_support

! Puppet : https://github.com/voxpupuli/puppet-proxysql/

! proxysql-tools : https://github.com/twindb/proxysql-tools

Page 35: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

35

Admin interface - service discovery

! Consul

! etcd

! zookeeper

Page 36: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

36

Admin interface - monitoring

! ClusterControl

! Collectd

! Diamond

! Graphite

! Datadog

! Grafana

Page 37: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

37

Admin interface - alerting

! ClusterControl

! Nagios

! Sensu

! Pagerduty

! OpsGenie

Page 38: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

38

Demo

Page 39: Webinar slides: High Availability in ProxySQL

Copyright 2017 Severalnines AB

39

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

! https://severalnines.com/resources/webinars/mysql-mariadb-load-balancing-proxysql-clustercontrol-introduction-webinar

! Install ClusterControl:

! https://severalnines.com/download-clustercontrol-database-management-system

! Contact: [email protected]