Proxysql ha plam_2016_2_keynote

128
Percona Live Europe 2016 Use ProxySQL to Improve Your MySQL High Availability Solution Marco Tusa Manager Consulting Amsterdam, Netherlands | October 3 – 5, 2016

Transcript of Proxysql ha plam_2016_2_keynote

Page 1: Proxysql ha plam_2016_2_keynote

Percona Live Europe 2016Use ProxySQL to Improve Your

MySQL High Availability SolutionMarco Tusa Manager Consulting

Amsterdam, Netherlands | October 3 – 5, 2016

Page 2: Proxysql ha plam_2016_2_keynote

2

● Marco “The Grinch” • Open source enthusiast

About me

Page 3: Proxysql ha plam_2016_2_keynote

3

What is HA

Page 4: Proxysql ha plam_2016_2_keynote

3

What is HA

Page 5: Proxysql ha plam_2016_2_keynote

3

What is HA9 0. 0 0 0 % (36 days) MySQL Replication 9 9. 9 0 0 % (8 hours) Linux Heartbeat with DRBD 9 9. 9 0 0 % (8 hours) RHCS with Shared Storage (Active/Passive) 9 9. 9 9 0 % (52 minutes) MHA with at least 3 nodes 9 9. 9 9 0 % (52 minutes) Linux Heartbeat with DRBD and Replication 9 9. 9 9 0 % (52 minutes) Linux Heartbeat with Shared Storage and Replication 9 9 .9 9 5 % (26 minutes) Multi Master (galera - percona cluster) 3 node minimum 9 9. 9 9 9 % (5 minutes) MySQL Cluster

Page 6: Proxysql ha plam_2016_2_keynote

4

What is HA

Page 7: Proxysql ha plam_2016_2_keynote

5

What is HA

Page 8: Proxysql ha plam_2016_2_keynote

6

Objectively What we have is:

Page 9: Proxysql ha plam_2016_2_keynote

6

Objectively What we have is:

Page 10: Proxysql ha plam_2016_2_keynote

6

Objectively What we have is:

Page 11: Proxysql ha plam_2016_2_keynote

6

Objectively What we have is:

Page 12: Proxysql ha plam_2016_2_keynote

6

Objectively What we have is:

MySQL Group Replication

Page 13: Proxysql ha plam_2016_2_keynote

7

The telephone game

Page 14: Proxysql ha plam_2016_2_keynote

8

All talking

Page 15: Proxysql ha plam_2016_2_keynote

9

Black box:

Page 16: Proxysql ha plam_2016_2_keynote

10

Use the Right Tool for the Job…

Page 17: Proxysql ha plam_2016_2_keynote

11

What we need

Page 18: Proxysql ha plam_2016_2_keynote

11

What we need

Page 19: Proxysql ha plam_2016_2_keynote

11

What we need

Page 20: Proxysql ha plam_2016_2_keynote

11

What we need

Page 21: Proxysql ha plam_2016_2_keynote

12

ProxySQL

Page 22: Proxysql ha plam_2016_2_keynote

13

ProxySQL

Page 23: Proxysql ha plam_2016_2_keynote

14

Understand the basics

Page 24: Proxysql ha plam_2016_2_keynote

14

Understand the basics

Write / Read (Master/Slave)

Page 25: Proxysql ha plam_2016_2_keynote

14

Understand the basics

Write / Read (Master/Slave)

Multiple Writers

Page 26: Proxysql ha plam_2016_2_keynote

14

Understand the basics

Write / Read (Master/Slave)

Multiple WritersSharding &

Geographic Distribution

Page 27: Proxysql ha plam_2016_2_keynote

14

Understand the basics

Write / Read (Master/Slave)

Multiple WritersSharding &

Geographic Distribution

Mirroring

Page 28: Proxysql ha plam_2016_2_keynote

14

Understand the basics

Write / Read (Master/Slave)

Multiple WritersSharding &

Geographic Distribution

Mirroring

Query re-write

Page 29: Proxysql ha plam_2016_2_keynote

15

Understand the basics – how this is done?

Page 30: Proxysql ha plam_2016_2_keynote

15

Servers group by function

Understand the basics – how this is done?

Page 31: Proxysql ha plam_2016_2_keynote

15

Servers group by functionHost Groups

Understand the basics – how this is done?

Page 32: Proxysql ha plam_2016_2_keynote

15

Servers group by functionHost Groups

Rules define what, where and how

Understand the basics – how this is done?

Page 33: Proxysql ha plam_2016_2_keynote

15

Servers group by functionHost Groups

Rules define what, where and howQuery Rules

Understand the basics – how this is done?

Page 34: Proxysql ha plam_2016_2_keynote

15

Servers group by functionHost Groups

Rules define what, where and howQuery Rules

Special Grouping for Replication

Understand the basics – how this is done?

Page 35: Proxysql ha plam_2016_2_keynote

15

Servers group by functionHost Groups

Rules define what, where and howQuery Rules

Special Grouping for ReplicationReplication Host Group

Understand the basics – how this is done?

Page 36: Proxysql ha plam_2016_2_keynote

16

HostGroup (HG) & Replication HG

Understand the basics

Page 37: Proxysql ha plam_2016_2_keynote

16

HostGroup (HG) & Replication HG

Understand the basics

Page 38: Proxysql ha plam_2016_2_keynote

17

Query rules

Understand the basics

Page 39: Proxysql ha plam_2016_2_keynote

18

Scheduler

Understand the basics

Page 40: Proxysql ha plam_2016_2_keynote

19

Basic scenario

Page 41: Proxysql ha plam_2016_2_keynote

19

Basic scenario

HG: 10U: app_RW

HG: 11U: app_R

HG: 12U: ETL_R

Page 42: Proxysql ha plam_2016_2_keynote

20

insert into mysql_users (username,password,active,default_hostgroup,default_schema) values ('app_RW','test',1,10,'test_schema');

insert into mysql_users (username,password,active,default_hostgroup,default_schema) values ('app_R','test',1,11,'test_schema');

insert into mysql_users (username,password,active,default_hostgroup,default_schema) values ('etl_R','test',1,12,’etl_schema'); LOAD MYSQL USERS TO RUNTIME;SAVE MYSQL USERS TO DISK;

Basic scenario - Users

Page 43: Proxysql ha plam_2016_2_keynote

21

INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight) VALUES ('192.168.1.5',10,3306,1000); INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight, max_replication_lag) VALUES ('192.168.1.6',11,3306,1000000,2); INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight, max_replication_lag) VALUES ('192.168.1.7',11,3306,1000000,2); INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight, max_replication_lag) VALUES ('192.168.1.5',11,3306,1,2); INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight) VALUES ('192.168.1.8',12,3306,10); INSERT INTO mysql_replication_hostgroups VALUES (10,11); LOAD MYSQL SERVERS TO RUNTIME; SAVE MYSQL SERVERS TO DISK;

Basic scenario – Servers / HG

Page 44: Proxysql ha plam_2016_2_keynote

22

insert into mysql_query_rules (username,destination_hostgroup,active,retries,match_digest,apply) values(’app_RW',10,1,3,'^SELECT.*FOR UPDATE',1); insert into mysql_query_rules (username,destination_hostgroup,active,retries,match_digest,apply) values(’app_RW',11,1,3,'^SELECT ',1); insert into mysql_query_rules (username,destination_hostgroup,active) values(’app_R',11,1); insert into mysql_query_rules (username,destination_hostgroup,active) values('etl_R',12,1);

LOAD MYSQL QUERY RULES TO RUNTIME;SAVE MYSQL QUERY RULES TO DISK;

Basic scenario – Query rules

Page 45: Proxysql ha plam_2016_2_keynote

23

Basic scenario – with ProxySQL

Page 46: Proxysql ha plam_2016_2_keynote

23

Basic scenario – with ProxySQL

Writes

Page 47: Proxysql ha plam_2016_2_keynote

23

Basic scenario – with ProxySQL

Writes

Reads

Page 48: Proxysql ha plam_2016_2_keynote

23

Basic scenario – with ProxySQL

Writes

ReadsReads

Page 49: Proxysql ha plam_2016_2_keynote

23

Basic scenario – with ProxySQL

ReadsReads

Page 50: Proxysql ha plam_2016_2_keynote

24

READ_ONLY = 0 WRITE HG READ_ONLY = 1 READ HG

ProxySQL – Replication HG

READ_ONLY=0 READ_ONLY=1 READ_ONLY=1

HG 11 HG 11HG 10 & HG 11

Page 51: Proxysql ha plam_2016_2_keynote

24

READ_ONLY = 0 WRITE HG READ_ONLY = 1 READ HG

ProxySQL – Replication HG

READ_ONLY=0 READ_ONLY=1

HG 10 & HG:11 HG 11

READ_ONLY=0

HG 10 & HG 11

Page 52: Proxysql ha plam_2016_2_keynote

24

READ_ONLY = 0 WRITE HG READ_ONLY = 1 READ HG

ProxySQL – Replication HG

READ_ONLY=0 READ_ONLY=1

HG 10 & HG:11 HG 11

READ_ONLY=0

HG 10 & HG 11

Page 53: Proxysql ha plam_2016_2_keynote

25

ProxySQL + MHA (or any controller)

Writes

ReadsReads

Page 54: Proxysql ha plam_2016_2_keynote

25

ProxySQL + MHA (or any controller)

Writes

ReadsReads

Page 55: Proxysql ha plam_2016_2_keynote

25

ProxySQL + MHA (or any controller)

Writes

ReadsReads

Page 56: Proxysql ha plam_2016_2_keynote

26

No movable part like:

ProxySQL + MHA (or any controller)

Page 57: Proxysql ha plam_2016_2_keynote

26

No movable part like:VIP

ProxySQL + MHA (or any controller)

Page 58: Proxysql ha plam_2016_2_keynote

26

No movable part like:VIP

DNS (Route 53 or similar)

ProxySQL + MHA (or any controller)

Page 59: Proxysql ha plam_2016_2_keynote

26

No movable part like:VIP

DNS (Route 53 or similar)No Crazy scripts to manage other proxy (ie HAProxy)

ProxySQL + MHA (or any controller)

Page 60: Proxysql ha plam_2016_2_keynote

26

No movable part like:VIP

DNS (Route 53 or similar)No Crazy scripts to manage other proxy (ie HAProxy)

Better distributed HA

ProxySQL + MHA (or any controller)

Page 61: Proxysql ha plam_2016_2_keynote

27

What timing with MHA?

Page 62: Proxysql ha plam_2016_2_keynote

27

MHA discovery time (ping x 3 times) -> ~9 sec

What timing with MHA?

Page 63: Proxysql ha plam_2016_2_keynote

27

MHA discovery time (ping x 3 times) -> ~9 secMHA recovery (binlog) variable time

What timing with MHA?

Page 64: Proxysql ha plam_2016_2_keynote

27

MHA discovery time (ping x 3 times) -> ~9 secMHA recovery (binlog) variable time

MHA Slave shift + Master READ-ONLY < 2 sec

What timing with MHA?

Page 65: Proxysql ha plam_2016_2_keynote

27

MHA discovery time (ping x 3 times) -> ~9 secMHA recovery (binlog) variable time

MHA Slave shift + Master READ-ONLY < 2 sec

ProxySQL will react as soon as READ_ONLY=0

What timing with MHA?

Page 66: Proxysql ha plam_2016_2_keynote

28

Nothing all defaults

master_ip_failover_script=master_ip_failover master_ip_online_change_script=master_ip_online_change

Test it:masterha_master_switch --master_state=alive --conf=/etc/mha.cnf --orig_master_is_new_slave --interactive=0 --running_updates_limit=0

What is needed with MHA?

Page 67: Proxysql ha plam_2016_2_keynote

29

Given no VIP or centralize element.

Why better distributed HA?

Page 68: Proxysql ha plam_2016_2_keynote

30

Integration with PXC\Galera

Page 69: Proxysql ha plam_2016_2_keynote

31

Integration with PXC\Galera

Page 70: Proxysql ha plam_2016_2_keynote

31

Integration with PXC\Galera

Page 71: Proxysql ha plam_2016_2_keynote

31

Integration with PXC\Galera

Page 72: Proxysql ha plam_2016_2_keynote

32

Integration with PXC\Galera

Page 73: Proxysql ha plam_2016_2_keynote

32

Integration with PXC\Galera read_only wsrep_status wsrep_rejectqueries wsrep_donorrejectqueries wsrep_connected wsrep_desinccount wsrep_ready wsrep_provider wsrep_segment Number of nodes in by segment Retry loop

Page 74: Proxysql ha plam_2016_2_keynote

32

Integration with PXC\Galera read_only wsrep_status wsrep_rejectqueries wsrep_donorrejectqueries wsrep_connected wsrep_desinccount wsrep_ready wsrep_provider wsrep_segment Number of nodes in by segment Retry loop

Online Offline_soft Offline_hard Shunned

Page 75: Proxysql ha plam_2016_2_keynote

32

Integration with PXC\Galera read_only wsrep_status wsrep_rejectqueries wsrep_donorrejectqueries wsrep_connected wsrep_desinccount wsrep_ready wsrep_provider wsrep_segment Number of nodes in by segment Retry loop

Online Offline_soft Offline_hard Shunned

But we also have Hostgroups Replication HG

Page 76: Proxysql ha plam_2016_2_keynote

33

Integration with PXC\Galera

Page 77: Proxysql ha plam_2016_2_keynote

33

Integration with PXC\Galera

Page 78: Proxysql ha plam_2016_2_keynote

33

Integration with PXC\Galera

Page 79: Proxysql ha plam_2016_2_keynote

34

Integration with PXC\Galera

HG: 10

HG: 10

HG: 12HG: 11

HG: 11HG: 12

Page 80: Proxysql ha plam_2016_2_keynote

35

Multiple writer vs Single writer

Integration with PXC\Galera

Page 81: Proxysql ha plam_2016_2_keynote

35

Multiple writer vs Single writerMulti writer based on weight and Hostgroups

Integration with PXC\Galera

Page 82: Proxysql ha plam_2016_2_keynote

35

Multiple writer vs Single writerMulti writer based on weight and Hostgroups

Need Replication HG and READ_ONLY

Integration with PXC\Galera

Page 83: Proxysql ha plam_2016_2_keynote

35

Multiple writer vs Single writerMulti writer based on weight and Hostgroups

Need Replication HG and READ_ONLYFailover is done without the need of performing actions on the nodes

Integration with PXC\Galera

Page 84: Proxysql ha plam_2016_2_keynote

35

Multiple writer vs Single writerMulti writer based on weight and Hostgroups

Need Replication HG and READ_ONLYFailover is done without the need of performing actions on the nodes

Failover is done modifying the READ_ONLY value

Integration with PXC\Galera

Page 85: Proxysql ha plam_2016_2_keynote

35

Multiple writer vs Single writerMulti writer based on weight and Hostgroups

Need Replication HG and READ_ONLYFailover is done without the need of performing actions on the nodes

Failover is done modifying the READ_ONLY valueSingle WRITER node isolation not guarantee

Integration with PXC\Galera

Page 86: Proxysql ha plam_2016_2_keynote

35

Multiple writer vs Single writerMulti writer based on weight and Hostgroups

Need Replication HG and READ_ONLYFailover is done without the need of performing actions on the nodes

Failover is done modifying the READ_ONLY valueSingle WRITER node isolation not guarantee

Single WRITER node isolation is guarantee

Integration with PXC\Galera

Page 87: Proxysql ha plam_2016_2_keynote

36

insert into mysql_users (username,password,active,default_hostgroup,default_schema) values ('app_RW','test',1,10,'test_schema');

insert into mysql_users (username,password,active,default_hostgroup,default_schema) values ('app_R','test',1,11,'test_schema');

insert into mysql_users (username,password,active,default_hostgroup,default_schema) values (‘appDR_R','test',1,12,’etl_schema'); LOAD MYSQL USERS TO RUNTIME;SAVE MYSQL USERS TO DISK;

Integration with PXC\Galera - Users

Page 88: Proxysql ha plam_2016_2_keynote

37

insert into mysql_query_rules (username,destination_hostgroup,active,retries,match_digest,apply) values(’app_RW',10,1,3,'^SELECT.*FOR UPDATE',1);

insert into mysql_query_rules (username,destination_hostgroup,active,retries,match_digest,apply) values(’app_RW',11,1,3,'^SELECT ',1);

insert into mysql_query_rules (username,destination_hostgroup,active) values(’app_R',11,1);

insert into mysql_query_rules (username,destination_hostgroup,active) values(‘appDR_R',12,1); LOAD MYSQL QUERY RULES TO RUNTIME;SAVE MYSQL QUERY RULES TO DISK;

Integration with PXC\Galera – QR

Page 89: Proxysql ha plam_2016_2_keynote

38

INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight)

VALUES ('192.168.1.5',10,3306,1000000000); 192.168.1.6 … 10000; 192.168.1.7 … 10

INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight) VALUES ('192.168.1.5',11,3306,1); 192.168.1.6 … 100000; 192.168.1.7 … 100000

INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight) VALUES ('192.168.1.8',12,3306,100); 192.168.1.9 … 100; LOAD MYSQL SERVERS TO RUNTIME; SAVE MYSQL SERVERS TO DISK;

Integration with PXC\Galera – HG MW

Page 90: Proxysql ha plam_2016_2_keynote

39

INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight) VALUES

('192.168.1.5',10,3306,100);

INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight) VALUES

('192.168.1.5',11,3306,1); INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight) VALUES

('192.168.1.6',11,3306,100); INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight) VALUES

('192.168.1.7',11,3306,100);

INSERT INTO mysql_servers (hostname,hostgroup_id,port,weight) VALUES ('192.168.1.8',12,3306,100); 192.168.1.9 … 100; INSERT INTO mysql_replication_hostgroups VALUES (10,11); LOAD MYSQL SERVERS TO RUNTIME; SAVE MYSQL SERVERS TO DISK;

Integration with PXC\Galera HG SW

Page 91: Proxysql ha plam_2016_2_keynote

40

ProxySQL is configured Now what?

Integration with PXC

Page 92: Proxysql ha plam_2016_2_keynote

40

ProxySQL is configured Now what?

Integration with PXC

Page 93: Proxysql ha plam_2016_2_keynote

40

ProxySQL is configured Now what?

Example scripthttps://github.com/Tusamarco/proxy_sql_toolsFull guide: https://goo.gl/vcDFZx

Integration with PXC

Page 94: Proxysql ha plam_2016_2_keynote

41

Set the script: INSERT INTO scheduler (id,active,interval_ms,filename,arg1) values (10,0,2000,"/var/lib/proxysql/galera_check.pl","-u=admin -p=admin -h=192.168.1.50 -H=500:W,501:R -P=3310 --execution_time=1 --retry_down=2 --retry_up=1 --main_segment=1 --debug=0 --log=/var/lib/proxysql/galeraLog"); LOAD SCHEDULER TO RUNTIME;SAVE SCHEDULER TO DISK; update scheduler set active=1 where id=10; LOAD SCHEDULER TO RUNTIME;

Integration with PXC

Page 95: Proxysql ha plam_2016_2_keynote

42

+--------------+-------------+--------+------------+---------+ | hostgroup_id | hostname | status | weight | comment | +--------------+-------------+--------+------------+---------+ | 10 | 192.168.1.5 | ONLINE | 1000000000 | | | 10 | 192.168.1.6 | ONLINE | 10000 | | | 10 | 192.168.1.7 | ONLINE | 10 | | | 11 | 192.168.1.5 | ONLINE | 1 | | | 11 | 192.168.1.6 | ONLINE | 100000 | | | 11 | 192.168.1.7 | ONLINE | 100000 | | | 12 | 192.168.1.8 | ONLINE | 100 | | | 12 | 192.168.1.9 | ONLINE | 100 | | +--------------+-------------+--------+------------+---------+

Integration with PXC MW

Page 96: Proxysql ha plam_2016_2_keynote

43

+--------------+-------------+--------+------------+---------+ | hostgroup_id | hostname | status | weight | comment | +--------------+-------------+--------+------------+---------+ | 10 | 192.168.1.5 |OFFLINE_SOFT | 1000000000 | 10_W_11_R_retry_up=0;10_W_11_R_retry_down=0; | 10 | 192.168.1.6 | ONLINE | 10000 | | | 10 | 192.168.1.7 | ONLINE | 10 | | | 11 | 192.168.1.5 | OFFLINE_SOFT | 1 | ... | | 11 | 192.168.1.6 | ONLINE | 100000 | | | 11 | 192.168.1.7 | ONLINE | 100000 | | | 12 | 192.168.1.8 | ONLINE | 100 | | | 12 | 192.168.1.9 | ONLINE | 100 | | +--------------+-------------+--------+------------+---------+

Integration with PXC MW

Page 97: Proxysql ha plam_2016_2_keynote

44

+---------------------------------+-------+| Variable_name | Value |+---------------------------------+-------+| wsrep_sst_donor_rejects_queries | ON |+---------------------------------+-------+

Integration with PXC MW

Page 98: Proxysql ha plam_2016_2_keynote

44

+---------------------------------+-------+| Variable_name | Value |+---------------------------------+-------+| wsrep_sst_donor_rejects_queries | ON |+---------------------------------+-------+

ProxySQL Think all is ok

Integration with PXC MW

Page 99: Proxysql ha plam_2016_2_keynote

44

+---------------------------------+-------+| Variable_name | Value |+---------------------------------+-------+| wsrep_sst_donor_rejects_queries | ON |+---------------------------------+-------+

ProxySQL Think all is ok

Application writes will fail

Integration with PXC MW

Page 100: Proxysql ha plam_2016_2_keynote

45

+--------------+-------------+--------+------------+---------+ | hostgroup_id | hostname | status | weight | comment | +--------------+-------------+--------+------------+---------+ | 10 | 192.168.1.6 | ONLINE | 10000 | | | 10 | 192.168.1.7 | ONLINE | 10 | | | 11 | 192.168.1.6 | ONLINE | 100000 | | | 11 | 192.168.1.7 | ONLINE | 100000 | | | 12 | 192.168.1.8 | ONLINE | 100 | | | 12 | 192.168.1.9 | ONLINE | 100 | | | 9010 | 192.168.1.5 | ONLINE | 1000000000 | | | 9011 | 192.168.1.5 | ONLINE | 1 | | +--------------+-------------+--------+------------+---------+

Integration with PXC MW

Page 101: Proxysql ha plam_2016_2_keynote

46

WRITE Fail-over is automatically perform by ProxySQL

following the weight Until an active node exists the HG

Integration with PXC MW

Page 102: Proxysql ha plam_2016_2_keynote

47

WRITE Fail-over will not happen

Until READ_ONLY variable is modified on a reader HG node.

WRITER if DONOR will never be OFFLINE_SOFT

Integration with PXC SW

Page 103: Proxysql ha plam_2016_2_keynote

48

Integration with PXC\Galera SW manual

Page 104: Proxysql ha plam_2016_2_keynote

48

Integration with PXC\Galera SW manual

Page 105: Proxysql ha plam_2016_2_keynote

48

Integration with PXC\Galera SW manual

Page 106: Proxysql ha plam_2016_2_keynote

49

Integration with PXC\Galera SW Auto

Page 107: Proxysql ha plam_2016_2_keynote

49

Integration with PXC\Galera SW Auto

Page 108: Proxysql ha plam_2016_2_keynote

49

Integration with PXC\Galera SW Auto

Page 109: Proxysql ha plam_2016_2_keynote

50

Change state to: OFFLINE_SOFT = ~2 sec

HostGroup 9000 = ~2 sec

ProxySQL Shunned = ~1.2 sec (5 fails in 1sec)

Failover (auto) = ~3 sec

Integration with PXC - Timing

Page 110: Proxysql ha plam_2016_2_keynote

51

Avoid SPOF

Page 111: Proxysql ha plam_2016_2_keynote

51

Avoid SPOF

Page 112: Proxysql ha plam_2016_2_keynote

51

Avoid SPOF

Page 113: Proxysql ha plam_2016_2_keynote

52

Cost in time

Page 114: Proxysql ha plam_2016_2_keynote

52

Cost in time

Page 115: Proxysql ha plam_2016_2_keynote

53

Cost in time

Page 116: Proxysql ha plam_2016_2_keynote

53

Cost in time

Page 117: Proxysql ha plam_2016_2_keynote

54

So what.. 9 0. 0 0 0 % (36 days) MySQL Replication 9 9. 9 0 0 % (8 hours) Linux Heartbeat with DRBD 9 9. 9 0 0 % (8 hours) RHCS with Shared Storage (Active/Passive) 9 9. 9 9 0 % (52 minutes) MHA with at least 3 nodes 9 9. 9 9 0 % (52 minutes) Linux Heartbeat with DRBD and Replication 9 9. 9 9 0 % (52 minutes) Linux Heartbeat with Shared Storage and Replication 9 9 .9 9 5 % (26 minutes) Multi Master (galera - percona cluster) 3 node minimum 9 9. 9 9 9 % (5 minutes) MySQL Cluster

Page 118: Proxysql ha plam_2016_2_keynote

55

Brief summary

Page 119: Proxysql ha plam_2016_2_keynote

55

Improve service flexibility with r/w split;

Brief summary

Page 120: Proxysql ha plam_2016_2_keynote

55

Improve service flexibility with r/w split;Allow simple way to manage access to specific servers by

usage (like DW-ETL);

Brief summary

Page 121: Proxysql ha plam_2016_2_keynote

55

Improve service flexibility with r/w split;Allow simple way to manage access to specific servers by

usage (like DW-ETL);Implement sharding;

Brief summary

Page 122: Proxysql ha plam_2016_2_keynote

55

Improve service flexibility with r/w split;Allow simple way to manage access to specific servers by

usage (like DW-ETL);Implement sharding;

Allow Query revrite/query fix/blocking without need to modify code;

Brief summary

Page 123: Proxysql ha plam_2016_2_keynote

55

Improve service flexibility with r/w split;Allow simple way to manage access to specific servers by

usage (like DW-ETL);Implement sharding;

Allow Query revrite/query fix/blocking without need to modify code;

Improve failover time;

Brief summary

Page 124: Proxysql ha plam_2016_2_keynote

55

Improve service flexibility with r/w split;Allow simple way to manage access to specific servers by

usage (like DW-ETL);Implement sharding;

Allow Query revrite/query fix/blocking without need to modify code;

Improve failover time;Reduce master downtime impact on reads;

Brief summary

Page 125: Proxysql ha plam_2016_2_keynote

55

Improve service flexibility with r/w split;Allow simple way to manage access to specific servers by

usage (like DW-ETL);Implement sharding;

Allow Query revrite/query fix/blocking without need to modify code;

Improve failover time;Reduce master downtime impact on reads;

Not SPOF (as vip)

Brief summary

Page 126: Proxysql ha plam_2016_2_keynote

56

Page 127: Proxysql ha plam_2016_2_keynote

57

Page 128: Proxysql ha plam_2016_2_keynote

58

Contacts

To contact Me

[email protected]

[email protected]

To follow me

http://www.tusacentral.net/

http://www.percona.com/blog/

https://www.facebook.com/marco.tusa.94

@marcotusa

http://it.linkedin.com/in/marcotusa/

“Consulting = No mission refused!”