MySQL High Availability with Percona XtraDB Cluster 5.7 Hands on tutorial!

Size: px
Start display at page:

Download "MySQL High Availability with Percona XtraDB Cluster 5.7 Hands on tutorial!"

Transcription

1 MySQL High Availability with Percona XtraDB Cluster 5.7 Hands on tutorial! 1

2 Introducing pxc-strict-mode 2 Peter Zaitsev pz@percona.com Alok Pathak alok.pathak@percona.com Krunal Bauskar krunal.bauskar@percona.com

3 Table of Contents 3 Introduction to PXC Setting up Environment Bootstrapping State Transfers Certi cation Errors Flow Control What's new with PXC-5.7 Introducing pxc_strict_mode Exploring PXC through PFS Securing PXC Load Balancers Percona Monitoring and Management (PMM)

4 Introduction to PXC 4 True Multi-master replication Synchronous replication Data consistency Multi-threaded Slave Transparent to Applications No complex failover Automatic Node Provisioning

5 Introduction to PXC 5

6 Are you ready? Setting Up The Environment 6

7 Setting Up The Environment 7 Fetch a USB Stick, copy the pxc57.ova virtualbox image Open Virtualbox, File -> Import Appliance -> Browse the pxc57.ova le

8 Setting Up The Environment 8 Click Next and Import

9 Setting Up The Environment 9 Start pxc[1-3] virtual machines one by one

10 Setting Up The Environment 10 Versions Serverversion: logPerconaXtraDBCluster(GPL) ProxySQLversion1.2.3

11 Attention Hands On! 11 When you see in the right bottom, there is an exercise that you should do!

12 Testing The Environment 12 ssh/putty to: pxc1: pxc2: pxc3: rootpassword is perconapassword Verify ssh between nodes Open 2 ssh sessions to every node

13 Bootstrapping A Cluster 13 Bootstrapping a node gives it permission to form a new cluster The bootstrapped node is the source of truth for all nodes going forward Bootstrapping should NOT happen automatically without a system with split-brain protection that can coordinate it. Usually this is done manually

14 Bootstrapping PXC 14 #servicemysqlbootstrap-pxc #/etc/init.d/mysqlbootstrap-pxc #/etc/init.d/mysqlstart--wsrep-new-cluster or with systemdenvironments like Centos 7: This sets empty gcomm:// address which starts the node as the rst of the cluster. Never use it to join an existing cluster. Today we are using 64-bit Centos 7.

15 Bootstrapping PXC 15 The node you bootstrapped.. Verify it with: pxc1mysql>showglobalstatuslike'wsrep%'; Variable_name Value wsrep_local_state 4 wsrep_local_state_comment... Synced wsrep_cluster_size 1 wsrep_cluster_status wsrep_connected Primary ON... wsrep_ready ON rowsinset(0.00sec)

16 State Transfers Recap On IST/SST 16 SST: State Snapshot Transfer Snapshot the whole database and transfer, using: IST: Incremental State Transfer Only transfer missing transactions One node of the cluster is DONOR

17 State Snapshot Transfers (SST) State Snapshot Transfer Methods Methods Type Speed BlocksDonor mysqldump Logical Slow Blocks rsync Physical Fastest Blocks xtrabackup-v2 Physical Fast Briefly The recommended SST method is xtrabackup-v2 because it locks donor for least amount of time. wsrep_sst_method=xtrabackup-v2 wsrep_sst_auth=sst:s3cret wsrep_sst_donor=<donor_list>

18 Adding new nodes to the Cluster 18 pxc2#systemctlstartmysql pxc3#systemctlstartmysql More veri cation pxc3mysql>showglobalstatuslike'wsrep%'; Variable_name Value wsrep_local_state wsrep_local_state_comment 4 Synced... wsrep_cluster_size... 3 wsrep_cluster_status Primary wsrep_connected... ON rowsinset(0.00sec)

19 myq_status 19 Monitor Galera metrics using myq_status #myq_statuswsrep mycluster/pxc1(idx:0)/galera3.17(r447d194) Wsrep Cluster NodeRepl Queue Ops Bytes Conflct Gcache Wind timepcnf #StatLaten Up Dn Up Dn Up Dn lcf bfa ist idxdstap 06:31:14P 3 3Sync2.5ms 06:31:15P 3 3Sync2.6ms K K k k :31:16P 3 3Sync2.5ms 06:31:17P 3 3Sync2.5ms K K k k P=Primary:Thenodeispartofaprimarycomponent(N=Non-primary) cnf=clusterconfigid:thisincrementswhenevertheclusterstatechanges NodeStat-Syncisnormal.Otherpossiblestates:Dono,Init ReplLatency:Averagetimeforatransactiontoreplicateacrossthecluster Queue:Replicationqueues(Upisoutbound,Dnisinbound).Dnqueue->applyqueue Ops:Replicationevents.UpOpsisdatathatwaswrittenonthisnodebyaclient Bytes:Replicationsize(sameasOps,butinBytes). Conflct:lcfandbfaarereplicationconflicts

20 Bootstrapping PXC With Stop/Start Of MySQL 20 When you need to start a new cluster from scratch, you decide which node to start with and you bootstrap it #systemctlstartmysql@bootstrap That node becomes the cluster source of truth (SSTs for all new nodes)

21 Bootstrapping PXC Without Restarting MySQL 21 When a cluster is already partitioned and you want to bring it up again. 1 or more nodes need to be in Non-Primary state. Choose the node that is newest and can be enabled (to work with application) To bootstrap online: mysql>setglobalwsrep_provider_options="pc.bootstrap=true"; be sure there is NO OTHER PRIMARY partition or there will be a split brain!!

22 Bootstrapping PXC Without Restarting MySQL 22 Use Case: Only 1 of the 3 nodes is available and the other 2 nodes crashed, causing node 1 to go Non-Primary. In Multi Datacenter environments: DC1 has 2 nodes, DC2 has 1 node, If DC1 dies, the single node in DC2 will go Non-Primary. To activate secondary DC, a bootstrap is necessary

23 Recover Cleanly Shutdown Cluster 23 Run the application (run_app.shproxysql) on pxc1 One by one, stop mysql on all 3 nodes pxc1#systemctlstopmysql@bootstrap pxc2#systemctlstopmysql pxc3#systemctlstopmysql How to restart Galera Cluster?

24 Recover Cleanly Shutdown Cluster 24 To restart an entire Galera Cluster, complete the following steps: Identify the node with the highest seqno. Start the most advanced node as the rst node of the cluster. Start the rest of the node as usual. How to identify most advanced node?

25 Recover Cleanly Shutdown Cluster 25 To restart an entire Galera Cluster, complete the following steps: Identify the node with the highest seqno. Start the most advanced node as the rst node of the cluster. Start the rest of the node as usual. How to identify most advanced node? Solution #cat/var/lib/mysql/grastate.dat #GALERAsavedstate version:2.1 uuid: e5a514d5-80f2-11e ea69a6a66f6e seqno: cert_index: Bootstrap node with highest seqno and start other nodes.

26 What if node crashed? 26 On a crashed node grastate.dat will look like this: cat/var/lib/mysql/grastate.dat #GALERAsavedstate version:2.1 uuid: e5a514d5-80f2-11e ea69a6a66f6e seqno: -1 cert_index: How can you know the seqno?

27 What if node crashed? 27 On a crashed node grastate.dat will look like this: cat/var/lib/mysql/grastate.dat #GALERAsavedstate version:2.1 uuid: e5a514d5-80f2-11e ea69a6a66f6e seqno: -1 cert_index: How can you know the seqno? Solution #mysqld_safe--wsrep-recover Loggingto'/var/lib/mysql/error.log'. Startingmysqlddaemonwithdatabasesfrom/var/lib/mysql WSREP:Runningpositionrecoverywith--log_error='/var/lib/mysql/wsrep_recovery.Uh8R WSREP:Recoveredpositione5a514d5-80f2-11e ea69a6a66f6e: mysqldfrompidfile/var/lib/mysql/pxc1.pidended

28 When putting in production unprepared... Certification Errors 28

29 Certification 29 What it does: Determine if writeset can be applied. Based on unapplied earlier transactions on master Such con icts must come from other nodes Happens on every node, individually Deterministic Results are not reported to other nodes in the cluster, as every node does certi cation and is a determinstic process. Pass: enter apply queue (commit success on master) Fail: drop transaction (or return deadlock on master) Serialized by GTID Cost based on # of keys or # of rows

30 Certification 30

31 Certification 31

32 Certification 32

33 Certification 33

34 Certification 34

35 Certification 35

36 Certification 36

37 Conflict Detection 37 Local Certi cation Failure (lcf) Transaction fails certi cation Post-replication Deadlock/Transaction Rollback Status Counter: wsrep_local_cert_failures Brute Force Abort (bfa) (Most Common) Deadlock/Transaction rolled back by applier threads Pre-commit Transaction Rollback Status Counter: wsrep_local_bf_aborts

38 Conflict Deadlock/Rollback 38 Note: Transaction Rollback can be gotten on any statement, including SELECT and COMMIT Example: pxc1mysql>commit; ERROR1213(40001):WSREPdetecteddeadlock/conflictandabortedthe transaction.tryrestartingthetransaction

39 Multi writer Conflict Types Brute Force Abort (bfa) 39 Transaction rolled back by applier threads Pre-commit Transaction Rollback can be gotten on any statement, including SELECT and COMMIT Status Counter: wsrep_local_bf_aborts

40 Brute Force Abort (bfa) 40

41 Brute Force Abort (bfa) 41

42 Brute Force Abort (bfa) 42

43 Brute Force Abort (bfa) 43

44 Brute Force Abort (bfa) 44

45 Brute Force Abort (bfa) 45

46 Brute Force Abort (bfa) 46

47 Multi writer Conflict Types Local Certification Failure (lcf) 47 Transaction fails certi cation Post-replication Deadlock on commit Status Counter: wsrep_local_cert_failures

48 Local Certification Failure (lcf) 48

49 Local Certification Failure (lcf) 49

50 Local Certification Failure (lcf) 50

51 Local Certification Failure (lcf) 51

52 Local Certification Failure (lcf) 52

53 Local Certification Failure (lcf) 53

54 Local Certification Failure (lcf) 54

55 Local Certification Failure (lcf) 55

56 Local Certification Failure (lcf) 56

57 Local Certification Failure (lcf) 57

58 Local Certification Failure (lcf) 58

59 Local Certification Failure (lcf) 59

60 Reproducing Conflict 60 On pxc1, create test table: pxc1mysql>createtabletest.deadlocks( iintunsignednotnullprimarykey, jvarchar(32), tdatetime ); pxc1mysql>insertintotest.deadlocksvalues(1,null,null); Run myq_status on pxc1: #myq_statuswsrep mycluster/pxc1(idx:1)/galera3.17(r447d194) Wsrep Cluster NodeRepl Queue Ops Bytes Conflct Gcache Wind timepcnf #StatLaten Up Dn Up Dn Up Dn lcf bfa ist idxdstap 06:47:51P 5 3Sync2.6ms K k :47:52P 5 3Sync2.6ms K8.0b k

61 Reproducing Conflict 61 On pxc1: pxc1mysql>begin; pxc1mysql>updatetest.deadlockssetj='pxc1',t=now()wherei=1; Before commit, go to pxc3: pxc3mysql>begin; pxc3mysql>updatetest.deadlockssetj='pxc3',t=now()wherei=1; pxc3mysql>commit; Now commit the transaction on pxc1: pxc1mysql>commit; pxc1mysql>select*fromtest.deadlocks;

62 Reproducing Conflict 62 It fails: pxc1mysql>commit; ERROR1213(40001):WSREPdetecteddeadlock/conflictandabortedthe transaction.tryrestartingthetransaction

63 Reproducing Conflict 63 It fails: pxc1mysql>commit; ERROR1213(40001):WSREPdetecteddeadlock/conflictandabortedthe transaction.tryrestartingthetransaction Which commit succeeded? Is this a lcf or a bfa? How would you diagnose this error?

64 Reproducing Conflict 64 Which commit succeeded? PXC3, rst one that got in cluster. Is this a lcf or a bfa? BFA How would you diagnose this error? #myq_statuswsrep mycluster/pxc1(idx:1)/galera3.17(r447d194) Wsrep Cluster NodeRepl Queue Ops Bytes Conflct Gcache Window timepcnf #StatLaten Up Dn Up Dn Up Dn lcf bfaist idxdstapp 06:48:10P 5 3Sync2.4ms K k :48:11P 5 3Sync2.4ms K0.7K k :48:12P 5 3Sync2.4ms K8.0b k showglobalstatuslike'wsrep_local_bf%'; showglobalstatuslike'wsrep_local_cert%'; Variable_name Value wsrep_local_bf_aborts 1 wsrep_local_cert_failures

65 Reproducing Conflict Log Conflicts pxc1mysql>setglobalwsrep_log_conflicts=on; 65 **PriorityTRANSACTION: TRANSACTION839659,ACTIVE0secstartingindexread mysqltablesinuse1,locked1 1lockstruct(s),heapsize1136,0rowlock(s) MySQLthreadid2,OSthreadhandle ,queryid648862Systemlock **VictimTRANSACTION: TRANSACTION838894,ACTIVE18sec 2lockstruct(s),heapsize1136,1rowlock(s),undologentries1 MySQLthreadid26212,OSthreadhandle ,queryid640599localhostro **WAITINGFORTHISLOCKTOBEGRANTED: RECORDLOCKSspaceid26pageno5nbits144indexPRIMARYoftablesbtest.sbtest T06:57: Z2[Note]WSREP:clusterconflictduetohighpriorityabo T06:57: Z2[Note]WSREP:Winningthread: THD:2,mode:applier,state:executing,conflict:noconflict,seqno: SQL:(null) T06:57: Z2[Note]WSREP:Victimthread: THD:26212,mode:local,state:idle,conflict:noconflict,seqno:-1 SQL:(null)

66 Reproducing Conflicts Summary 66 Con icts are of a concern when determining if PXC is a t for the application: Long running transactions increase chance of con Heavy write workload on multiple nodes Large transactions increase chance of con icts icts These issues can usually be resolved by writing to 1 node only.

67 Hey! Wait for me! Flow Control 67

68 Flow Control 68 Avoiding nodes drift behind (slave lag?) Any node in the cluster can ask the other nodes to pause writes if it lags behind too much. Caused by wsrep_local_recv_queue exceeding a node s gcs.fc_limit Can cause all writes on all nodes in the entire cluster to be stalled.

69 Flow Control 69

70 Flow Control 70

71 Flow Control 71

72 Flow Control 72

73 Flow Control 73

74 Flow Control 74

75 Flow Control 75

76 Flow Control 76

77 Flow Control 77

78 Flow Control 78

79 Flow Control 79

80 Flow Control 80

81 Flow Control 81

82 Flow Control 82

83 Flow Control 83

84 Flow Control 84

85 Flow Control 85

86 Flow Control 86

87 Flow Control 87

88 Flow Control 88

89 Flow Control Status Counters 89 wsrep_ ow_control_paused_ns: nanoseconds since starts of node did the cluster get stalled. wsrep_ ow_control_recv: Amount of ow control messages received from other nodes wsrep_ ow_control_sent: Amount of ow control messages sent to other nodes

90 Flow Control Observing Flow Control 90 Run the application (run_app.sh) Run myq_statuswsrepon all nodes. LOCKTABLEsbtest.sbtest1on pxc3 and observe its effect on the cluster.

91 Flow Control Observing Flow Control 91 Run the application (run_app.sh) Run myq_statuswsrepon all nodes. LOCKTABLEsbtest.sbtest1on pxc3 and observe its effect on the cluster. pxc1 run_app.sh all nodes: myq_statuswsrep pxc3mysql>setglobalpxc_strict_mode='disabled'; pxc3mysql>locktablessbtest.sbtest1write; waituntilflowcontrolkicksin... pxc3mysql>unlocktables; pxc3mysql>setglobalpxc_strict_mode='enforcing';

92 Flow Control 92 Any node in the cluster can ask the other nodes to pause writes if it lags behind too much. A node can lag behind more before sending ow control messages, controlled via gcs.fc_limit. This can be controlled per node. Is there another alternative?

93 Flow Control DESYNC mode 93 It's possible to let a node going behind the ow control limit. This can be performed by setting wsrep_desync=on

94 Flow Control DESYNC mode 94 It's possible to let a node going behind the ow control limit. This can be performed by setting wsrep_desync=on pxc3mysql>setglobalwsrep_desync=on;

95 What's new in PXC 5.7? 95 Save your workload from experimental features: Introducing pxc-strict-mode. Extended support for PFS. Now monitor Galera and wsrep instrument through PFS. Support for encrypted tablespaces in Multi-Master Topology. PXC can wire encrypted tablespace to new booting node. Proxy-SQL compatible PXC PXC is ProxySQL compatible with new single step con guration.

96 What's new in PXC 5.7? 96 PMM enabled monitoring for PXC Effectively monitor PXC using PMM. MySQL/PS and galera-3.17 compatibility Bug xes, Improved logging and lot more. Simpli ed packaging for PXC PXC packages now takes care of galera installation too. Support to use latest Xtrabackup with enhanced security checks. Feel power of improved and latest XB with PXC.

97 Why pxc_strict_mode? PXC/Galera limitations: 97 Supports only Transactional Storage Engine. Explicit locks don t t in multi-master topology. Need of primary key for certi cation data generation. XA-transaction are not supported.

98 Understanding pxc_strict_mode 98 ENFORCING (DEFAULT/RECOMMENDED) Use of experimental features raises error. (during startup server refuse to start and runtime operation is blocked. error is logged) DISABLED PXC-5.6 compatible. Allows experimental feature. No error. No warning PERMISSIVE Use of experimental features results in a warning at startup and runtime. Server continues to accept the setting and operate. MASTER Same as ENFORCING for all experimental features except explicttable-locking validation checks are not performed under this mode.

99 Understanding pxc_strict_mode 99 pxc_strict_mode is local to given node and if user plan to toggle it, it should be done on all the nodes for cluster consistency and correctness. Toggling pxc_strict_mode from less strict mode to more strict mode For example: DISABLED -> ENFORCING... need to ensure ENFORCING characteristics are met. Like wsrep_replicate_myisam=off binlog_format=row log_output=file/none tx_isolation=serializable.

100 pxc_strict_mode blocks 100 Semantics blocked: DML and DDL operations (except CREATE/DROP) are not permitted on non-transactional Storage Engine. Table can be converted from non-transactional SE to transactional SE using ALTER. Trying to enable MyISAM replication is blocked. binlog-format has to be ROW.

101 pxc_strict_mode blocks 101 Semantics blocked: DML to tables without primary-key is not allowed. log-output has to be directed to FILE or DISABLED (NONE). Explicit TABLE locking feature (LOCK table, GET_LOCK, FLUSH TABLE WITH READ LOCK, Setting SERIALIZABLE transaction level) is blocked. auto-increment mode has to be INTERLEAVED. Combining Schema and DML changes in single statement like CTAS is not permitted.

102 pxc_strict_mode hands on 102 Let's try some simple command with pxc-strict-mode ENFORCING pxc3mysql>createtablet1(iint,primarykeypk(i))engine=myisam; pxc3mysql>insertintot1values(1); ERROR1105(HY000):Percona-XtraDB-ClusterprohibitsuseofDMLcommand onatable(test.t1)thatresidesinnon-transactionalstorageengine withpxc_strict_mode=enforcingormaster pxc3mysql>setwsrep_replicate_myisam=1; ERROR1105(HY000):Percona-XtraDB-ClusterprohibitsuseofMyISAMtable replicationfeaturewithpxc_strict_mode=enforcingormaster pxc3mysql>altertablet1engine=innodb; pxc3mysql>insertintot1values(1); pxc3mysql>locktablet1read; ERROR1105(HY000):Percona-XtraDB-Clusterprohibitsuseof LOCKTABLE/FLUSHTABLE<table>WITHREADLOCKwithpxc_strict_mode=ENFORCING pxc3mysql>droptablet1;

103 Let's have a small test now? 103 pxc3mysql>setglobalpxc_strict_mode='disabled'; pxc3mysql>createtablemyisam(iint,primarykeypk(i))engine=myisam; pxc3mysql>setglobalwsrep_replicate_myisam=1; pxc3mysql>insertintomyisamvalues(1),(2),(3); pxc3mysql>altertablemyisamaddcolumnjint; pxc3mysql>updatemyisamsetj=100; pxc3mysql>select*frommyisam; pxc3mysql>droptablemyisam; pxc3mysql>setglobalpxc_strict_mode='enforcing'; WillitPASS?FAIL?WARNING?

104 Restore pxc_strict_mode 104 Remember to restore the mode back to ENFORCING before we proceed with next set of experiment. pxc3mysql>setglobalwsrep_replicate_myisam=0; pxc3mysql>setglobalpxc_strict_mode='enforcing';

105 Monitoring PXC through Performance Schema Traditional method to monitor PXC or MySQL through log le is time consuming and may need special tool even to detect occurrence of an event. Performance Schema is effective way and has become de facto standard for monitoring different elements of MySQL. Till 5.6 PXC had limited support for performance_schema where-in only wsrep related instruments were exposed through performance schema that too in limited fashion. Starting PXC-5.7 we have taken big-step further enabling monitoring of galera instruments and other wsrep-instruments as part of performance schema. 105

106 Monitoring PXC through Performance Schema Instruments that are monitored: THREADS: applier, rollback, service_thd, gcomm conn, receiver, sst/ist threads, etc LOCK/COND_VARIABLES: from wsrep and galera library. FILE: record-set le, ring-buffer le (default gcache), gcache-page le. STAGES: Different stage threads are passing through. With this information, user should able to track some of the most important instruments that can help get some insight as to where server is really spending time or out-of-path ow like rollback of transactions. 106

107 Experimenting P_S threads 107 Let's see what all different threads are active: pxc3mysql>selectthread_id,namefromperformance_schema.threads wherenamelike'%galera%'ornamelike'%wsrep%'; thread/galera/thread_galera_service_thd 4 thread/galera/thread_galera_gcommconn 5 thread/galera/thread_galera_receiver 6 thread/sql/thread_wsrep_applier 7 thread/sql/thread_wsrep_rollbacker rowsinset(0.03sec) pxc3mysql>setglobalwsrep_slave_threads=10; pxc3mysql>selectcount(*)fromperformance_schema.threads wherenamelike'%thread_wsrep_applier%'; pxc3mysql>setglobalwsrep_slave_threads=1; pxc3mysql>selectcount(*)fromperformance_schema.threads wherenamelike'%thread_wsrep_applier%'; pxc1#/root/bin/run_app.sh[stopappafter2seconds] pxc3mysql>selectcount(*)fromperformance_schema.threads wherenamelike'%thread_wsrep_applier%';

108 Experimenting P_S files 108 Let's now checkout les pxc3mysql>select*fromperformance_schema.file_instances wherefile_namelike '%galera%'; FILE_NAME EVENT_NAME OPEN_COU /var/lib/mysql/galera.cache wait/io/file/galera/file_galera_ringbuffer rowinset(0.02sec) pxc3mysql>select*fromperformance_schema.file_instances wherefile_namelike'%gcache%'; FILE_NAME EVENT_NAME /var/lib/mysql/dn1/gcache.page wait/io/file/galera/file_galera_gcache_page

109 Experimenting P_S files 109 Some other importants points related to les: Galera uses mmap for most of these les and so we avoid updating read/write stats for le available through le_summary_by_instance/ le_summary_by_event_name.* Only dynamically changing caching write-set are cached. grastate/gvwstate les are not tracked.

110 Experimenting P_S mutex/cond_var 110 Enable instruments: pxc3mysql>useperformance_schema; pxc3mysql>updatesetup_consumerssetenabled='yes' wherenamelike'%events_waits_%'; pxc3mysql>updatesetup_consumerssetenabled='yes' wherenamelike'%events_stages_%'; pxc3mysql>updatesetup_instrumentssetenabled='yes',timed='yes' wherenamelike'%wsrep%'ornamelike'%galera%'; pxc3mysql>usetest;createtablet(iint,primarykeypk(i))engine=innodb; pxc3mysql>begin;insertintotvalues(1); pxc2mysql>usetest;begin;insertintotvalues(1);commit; pxc3mysql>commit; pxc3mysql>selectthread_id,event_name,timer_waitfrom performance_schema.events_waits_historywhereevent_namelike'%rollback%'; pxc3mysql>selectthread_id,event_name,timer_waitfrom performance_schema.events_waits_currentwhereevent_namelike'%rollback%'; pxc3mysql>selectthread_id,event_id,event_name,timer_waitfrom performance_schema.events_waits_historywhereevent_namelike'%monitor%'; (Checktheapplyandcommitmonitorbeinginvokedbyapplierthread)

111 Experimenting P_S stages 111 Findout precisely what the threads are doing pxc3mysql>select*fromperformance_schema.events_stages_current; [Whatarethreadcurrentlyexecuting.] pxc3mysql>select*fromperformance_schema.events_stages_history; [Whatactionwasreplicatedearlier.UPDATE,INSERT,DELETE. Wasitfinallycommitted] stage/wsrep/wsrep:aborteractive wsrep stage/wsrep/wsrep:applyingwriteset wsrep stage/wsrep/wsrep:writingrows 167 stage/wsrep/wsrep:applieridle log_e wsrep stage/wsrep/wsrep:committing wsrep pxc3mysql>useperformance_schema; pxc3mysql>updatesetup_consumerssetenabled='no' wherenamelike'%events_waits_%'; pxc3mysql>updatesetup_consumerssetenabled='no' wherenamelike'%events_stages_%'; pxc3mysql>updatesetup_instrumentssetenabled='no',timed='no' wherenamelike'%wsrep%'ornamelike'%galera%';

112 Securing PXC 112 There are 2 main components to secure. Traf c (SST/IST inter-node traf c). [5.6 feature] Tablespace. [5.7 feature] Securing inter-node traf c is acheieved using SSL and support is present since PXC-5.6. For SST using xtrabackup-v2 or mysqldump can help achieve this. Recommended approach is xtrabackup due to added exibility in locking database while servicing SST. For IST galera in-build SSL support ensure that replication channel is secured.

113 Securing PXC 113 PXC-5.7 extended support for MySQL introduced encrypted tablespace. This means using XB/mysqldump these encrpyted tablespaces will be moved to new booting node and re-encrpyted with new node con guration making them auto-available to end-user in secured fashion. This help completes the loop of ensuring everything is secured in PXC. --early-plugin-load [keyring_file_data]

114 Spread the load Load Balancers 114

115 Load Balancers 115 With PXC a Load Balancer is commonly used: Lot's of choice HAProxy (most-common) ProxySQL MariaDB MaxScale ScaleArc (proprietary) MySQL Router

116 Load Balancers ProxySQL 116 High-performance Proxy for MySQL and forks Query routing and read/write split On-the- y rewrite of queries Caching reads outside the database server Supports failover High Availability Runtime recon guration

117 Load Balancers ProxySQL 117 All backends are grouped into hostgroups Hostgroups have logical functionalities

118 Load Balancers ProxySQL 118 All backends are grouped into hostgroups Hostgroups have logical functionalities HG10 : Write masters

119 Load Balancers ProxySQL 119 All backends are grouped into hostgroups Hostgroups have logical functionalities HG10 : Write masters HF11 : Read Slaves

120 Load Balancers ProxySQL 120 All backends are grouped into hostgroups Hostgroups have logical functionalities HG10 : Write masters HF11 : Read Slaves Read/Write Split

121 Load Balancers ProxySQL Scheduler 121 Scheduler is a cron-like solution embedded directly inside ProxySQL Can run any external scripts Support for Percona XtraDB Cluster

122 Load Balancers ProxySQL Admin 122 Tool for con guring Percona XtraDB Cluster nodes with ProxySQL --enableoption to automatically con gure a PXC into ProxySQL Add Percona XtraDB Cluster node into the ProxySQL database Add the monitoring scripts into the ProxySQL scheduler table Create two new users, one user for monitoring, other one for communicating with the cluster --disableoption to remove PXC con guration from ProxySQL

123 Load Balancers ProxySQL 123

124 Load Balancers ProxySQL Admin mysql--host= user=admin--password=admin--port= YourMySQLconnectionidis20795 Serverversion:5.5.30(ProxySQLAdminModule) 124 ProxySQL Admin(proxysql-admin) to con gure PXC nodes into ProxySQL. /bin/proxysql-admin--proxysql-user=admin--proxysql-password=admin\ --proxysql-port=6032--proxysql-host= \ --cluster-user=test--cluster-password=test--cluster-port=3306\ --cluster-host= \ --galera-check-interval=1000--enable--mode='loadbal'--adduser

125 Load Balancers ProxySQL Setup pxc1mysql>selecthostgroup_id,hostname,port,statusfrommysql_servers; hostgroup_id hostname port status pxc ONLINE 10 pxc ONLINE 10 pxc ONLINE rowsinset(0.00sec) 125 pxc1mysql>selectusername,password,active,default_hostgroupfrommysql_users; username password active default_hostgroup test *94BDCEBE19083CE2A1F rowinset(0.01sec)

126 Load Balancers ProxySQL Setup Usage:/bin/proxysql_galera_checker<hostgroup_idwrite>[hostgroup_idread] [numberwriters][writersarereaders0 1}[log_file] 126 pxc1mysql>selectid,active,interval_ms,filename,arg1,arg2, arg3,arg4,arg5fromscheduler\g **************************1.row*************************** id:10 active:1 interval_ms:1000 filename:/bin/proxysql_galera_checker arg1:10 arg2:10 arg3:3 arg4:1 arg5:/var/lib/proxysql/proxysql_galera_check.log **************************2.row*************************** id:11 active:1 interval_ms:5000 filename:/bin/proxysql_node_monitor arg1:10 arg2:/var/lib/proxysql/proxysql_node_monitor.log...

127 Load Balancers ProxySQL Load balancing 127 ProxySQL is con gured to listen on port 6033for applications whiletrue; do sleep1; done pxc pxc pxc

128 Load Balancers ProxySQL R/W Split 128

129 Load Balancers ProxySQL Hostgroups 129 All backends are grouped into hostgroups Serverversion:5.5.30(ProxySQLAdminModule)... pxc1mysql>selecthostgroup_id,hostname,port,status,weightfrommysql_servers; hostgroup_id hostname port status weight pxc ONLINE pxc ONLINE pxc ONLINE pxc ONLINE pxc ONLINE pxc ONLINE rowsinset(0.00sec)

130 Load Balancers ProxySQL R/W split pxc1mysql>selectactive,match_pattern,destination_hostgroup,apply frommysql_query_rules; active match_pattern destination_hostgroup apply ^SELECT.* ^SELECT.*FORUPDATE rowsinset(0.00sec) 130 Application User: pxc1mysql>selectusername,password,active,default_hostgroupfrommysql_users; username password active default_hostgroup test *94BDCEBE19083CE2A1F959FD rowinset(0.00sec)

131 Load Balancers ProxySQL Scheduler Usage:/bin/proxysql_galera_checker [hostgroup_idwrite][hostgroup_idread][numberwriters] [writersarereaders0 1][log_file] 131 pxc1mysql>selectid,active,interval_ms,filename, arg1,arg2,arg3, arg4,arg5fromscheduler\g **************************1.row*************************** id:10 active:1 interval_ms:3000 filename:/bin/proxysql_galera_checker arg1:10 arg2:11 arg3:1 arg4:0 arg5:/var/lib/proxysql/proxysql_galera_check.log 1rowinset(0.00sec)

132 Load Balancers ProxySQL Scheduler pxc1mysql> LOADMYSQLSERVERSTORUNTIME; SAVEMYSQLSERVERSTODISK; LOADMYSQLUSERSTORUNTIME; SAVEMYSQLUSERSTODISK; LOADMYSQLQUERYRULESTORUNTIME; SAVEMYSQLQUERYRULESTODISK; LOADSCHEDULERTORUNTIME; SAVESCHEDULERTODISK; LOADMYSQLVARIABLESTORUNTIME; SAVEMYSQLVARIABLESTODISK; 132

133 Load Balancers ProxySQL R/W split pxc1mysql>selecthostgroup_id,hostname,port,status,weightfrommysql_servers; hostgroup_id hostname port status weight pxc ONLINE pxc OFFLINE_SOFT pxc OFFLINE_SOFT pxc OFFLINE_SOFT pxc ONLINE pxc ONLINE rowsinset(0.00sec) 133

134 Load Balancers ProxySQL R/W split 134 ProxySQL is con gured to listen on port 6033for applications whiletrue; do sleep1; done pxc pxc

135 Load Balancers ProxySQL R/W split 135 Let's verify how it balance our writes query: whiletrue; do mysql-hpxc1-p6033-utest-ptest\ orderbyrand()limit1forupdate;"2>/dev/null; sleep1; done id k pxc id k pxc

136 MySQL High Availability with Percona XtraDB Cluster 5.7 Q&A 136

137 137 Remember to rate our talk on the mobile app! Peter Zaitsev Alok Pathak Krunal Bauskar

Understanding Percona XtraDB Cluster 5.7 Operation and Key Algorithms. Krunal Bauskar PXC Product Lead (Percona Inc.)

Understanding Percona XtraDB Cluster 5.7 Operation and Key Algorithms. Krunal Bauskar PXC Product Lead (Percona Inc.) Understanding Percona XtraDB Cluster 5.7 Operation and Key Algorithms Krunal Bauskar PXC Product Lead (Percona Inc.) Objective I want to use Percona XtraDB Cluster but is it suitable for my needs and can

More information

HA solution with PXC-5.7 with ProxySQL. Ramesh Sivaraman Krunal Bauskar

HA solution with PXC-5.7 with ProxySQL. Ramesh Sivaraman Krunal Bauskar HA solution with PXC-5.7 with ProxySQL Ramesh Sivaraman Krunal Bauskar Agenda What is Good HA eco-system? Understanding PXC-5.7 Understanding ProxySQL PXC + ProxySQL = Complete HA solution Monitoring using

More information

Migrating to XtraDB Cluster 2014 Edition

Migrating to XtraDB Cluster 2014 Edition Migrating to XtraDB Cluster 2014 Edition Jay Janssen Managing Consultant Overview of XtraDB Cluster Percona Server + Galera Cluster of Innodb nodes Readable and Writable Virtually Synchronous All data

More information

Percona XtraDB Cluster MySQL Scaling and High Availability with PXC 5.7 Tibor Korocz

Percona XtraDB Cluster MySQL Scaling and High Availability with PXC 5.7 Tibor Korocz Percona XtraDB Cluster MySQL Scaling and High Availability with PXC 5.7 Tibor Korocz Architect Percona University Budapest 2017.05.11 1 2016 Percona Scaling and High Availability (application) 2 Scaling

More information

Percona XtraDB Cluster

Percona XtraDB Cluster Percona XtraDB Cluster Ensure High Availability Presenter Karthik P R CEO Mydbops www.mydbops.com info@mydbops.com Mydbops Mydbops is into MySQL/MongoDB Support and Consulting. It is founded by experts

More information

Percona XtraDB Cluster 5.7 Enhancements Performance, Security, and More

Percona XtraDB Cluster 5.7 Enhancements Performance, Security, and More Percona XtraDB Cluster 5.7 Enhancements Performance, Security, and More Michael Coburn, Product Manager, PMM Percona Live Dublin 2017 1 Your Presenter Product Manager for PMM (Percona Monitoring and Management)

More information

Percona XtraDB Cluster ProxySQL. For your high availability and clustering needs

Percona XtraDB Cluster ProxySQL. For your high availability and clustering needs Percona XtraDB Cluster-5.7 + ProxySQL For your high availability and clustering needs Ramesh Sivaraman Krunal Bauskar Agenda What is Good HA eco-system? Understanding PXC-5.7 Understanding ProxySQL PXC

More information

MySQL High Availability

MySQL High Availability MySQL High Availability And other stuff worth talking about Peter Zaitsev CEO Moscow MySQL Users Group Meetup July 11 th, 2017 1 Few Words about Percona 2 Percona s Purpose To Champion Unbiased Open Source

More information

Kenny Gryp. Ramesh Sivaraman. MySQL Practice Manager. QA Engineer 2 / 60

Kenny Gryp. Ramesh Sivaraman. MySQL Practice Manager. QA Engineer 2 / 60 Group Replication Us Ramesh Sivaraman Kenny Gryp QA Engineer MySQL Practice Manager 2 / 60 Table of Contents 1. Overview 2. Similarities 3. Differences GR & Galera 4. Differences PXC & Galera 5. Limitations

More information

Choosing a MySQL HA Solution Today. Choosing the best solution among a myriad of options

Choosing a MySQL HA Solution Today. Choosing the best solution among a myriad of options Choosing a MySQL HA Solution Today Choosing the best solution among a myriad of options Questions...Questions...Questions??? How to zero in on the right solution You can t hit a target if you don t have

More information

Choosing a MySQL HA Solution Today

Choosing a MySQL HA Solution Today Choosing a MySQL HA Solution Today Choosing the best solution among a myriad of options. Michael Patrick Technical Account Manager at Percona The Evolution of HA in MySQL Blasts from the past Solutions

More information

MySQL Group Replication & MySQL InnoDB Cluster

MySQL Group Replication & MySQL InnoDB Cluster MySQL Group Replication & MySQL InnoDB Cluster Production Ready? Kenny Gryp productions Table of Contents Group Replication MySQL Shell (AdminAPI) MySQL Group Replication MySQL Router Best Practices Limitations

More information

Percona XtraDB Cluster Tutorial

Percona XtraDB Cluster Tutorial Percona XtraDB Cluster Tutorial http://www.percona.com/training/ 2011-2017 Percona, Inc. 1 / 102 Table of Contents 1. Overview & Setup 6. Monitoring Galera 2. Migrating from M/S 3. Galera Replication Internals

More information

Percona XtraDB Cluster powered by Galera. Peter Zaitsev CEO, Percona Slide Credits: Vadim Tkachenko Percona University, Washington,DC Sep 12,2013

Percona XtraDB Cluster powered by Galera. Peter Zaitsev CEO, Percona Slide Credits: Vadim Tkachenko Percona University, Washington,DC Sep 12,2013 powered by Galera Peter Zaitsev CEO, Percona Slide Credits: Vadim Tkachenko Percona University, Washington,DC Sep 12,2013 This talk High Availability Replication Cluster What is HA Availability Avail ~

More information

FromDual Annual Company Meeting

FromDual Annual Company Meeting FromDual Annual Company Meeting Athens, 2013 Galera Cluster for MySQL http:// 1 / 26 About FromDual GmbH (LLC) FromDual provides neutral and independent: Consulting for MySQL Support for MySQL and Galera

More information

MySQL Replication Options. Peter Zaitsev, CEO, Percona Moscow MySQL User Meetup Moscow,Russia

MySQL Replication Options. Peter Zaitsev, CEO, Percona Moscow MySQL User Meetup Moscow,Russia MySQL Replication Options Peter Zaitsev, CEO, Percona Moscow MySQL User Meetup Moscow,Russia Few Words About Percona 2 Your Partner in MySQL and MongoDB Success 100% Open Source Software We work with MySQL,

More information

What s new in Percona Xtradb Cluster 5.6. Jay Janssen Lead Consultant February 5th, 2014

What s new in Percona Xtradb Cluster 5.6. Jay Janssen Lead Consultant February 5th, 2014 What s new in Percona Xtradb Cluster 5.6 Jay Janssen Lead Consultant February 5th, 2014 Overview PXC 5.6 is the aggregation of Percona Server 5.6 Codership MySQL 5.6 patches Galera 3.x Agenda Major new

More information

Advanced Percona XtraDB Cluster in a nutshell... la suite Hands on tutorial for advanced users!

Advanced Percona XtraDB Cluster in a nutshell... la suite Hands on tutorial for advanced users! Advanced Percona XtraDB Cluster in a nutshell... la suite Hands on tutorial for advanced users! 1 2 Frédéric 'lefred' Descamps lefred@percona.com Kenny 'kenji' Gryp kenny.gryp@percona.com 3 Table of Contents

More information

Percona Live Europe 2016 Use ProxySQL to Improve Your MySQL High Availability Solution

Percona Live Europe 2016 Use ProxySQL to Improve Your MySQL High Availability Solution Percona Live Europe 2016 Use ProxySQL to Improve Your MySQL High Availability Solution Marco Tusa Manager Consulting Amsterdam, Netherlands October 3 5, 2016 About me Marco The Grinch Open source enthusiast

More information

Using MySQL for Distributed Database Architectures

Using MySQL for Distributed Database Architectures Using MySQL for Distributed Database Architectures Peter Zaitsev CEO, Percona SCALE 16x, Pasadena, CA March 9, 2018 1 About Percona Solutions for your success with MySQL,MariaDB and MongoDB Support, Managed

More information

Percona XtraDB Cluster

Percona XtraDB Cluster Percona XtraDB Cluster Field Guide Issue No. 1 By Jay Janssen, Jervin Real and Peter Zaitsev Copyright 2006-2014 Percona LLC Percona XtraDB Cluster: Field Guide Issue No. 1 This is the first is a series

More information

MariaDB Enterprise Cluster. MariaDB Training

MariaDB Enterprise Cluster. MariaDB Training MariaDB Enterprise Cluster MariaDB Training Introduction MariaDB Enterprise Cluster Introduction State Transfer Schema Changes Load Balancing Architecture Installation Caveats Multi-Master Conflicts Back-Ups

More information

Geographically Dispersed Percona XtraDB Cluster Deployment. Marco (the Grinch) Tusa September 2017 Dublin

Geographically Dispersed Percona XtraDB Cluster Deployment. Marco (the Grinch) Tusa September 2017 Dublin Geographically Dispersed Percona XtraDB Cluster Deployment Marco (the Grinch) Tusa September 2017 Dublin About me Marco The Grinch Open source enthusiast Percona consulting Team Leader 2 Agenda What is

More information

G a l e r a C l u s t e r Schema Upgrades

G a l e r a C l u s t e r Schema Upgrades G a l e r a C l u s t e r Schema Upgrades Seppo Jaakola Codership Agenda Galera Cluster Overview DDL vs DML Demo of DDL Replication in Galera Cluster Rolling Schema Upgrade (RSU) Total Order Isolation

More information

Highly Available Database Architectures in AWS. Santa Clara, California April 23th 25th, 2018 Mike Benshoof, Technical Account Manager, Percona

Highly Available Database Architectures in AWS. Santa Clara, California April 23th 25th, 2018 Mike Benshoof, Technical Account Manager, Percona Highly Available Database Architectures in AWS Santa Clara, California April 23th 25th, 2018 Mike Benshoof, Technical Account Manager, Percona Hello, Percona Live Attendees! What this talk is meant to

More information

ProxySQL - GTID Consistent Reads. Adaptive query routing based on GTID tracking

ProxySQL - GTID Consistent Reads. Adaptive query routing based on GTID tracking ProxySQL - GTID Consistent Reads Adaptive query routing based on GTID tracking Introduction Rene Cannao Founder of ProxySQL MySQL DBA Introduction Nick Vyzas ProxySQL Committer MySQL DBA What is ProxySQL?

More information

Which technology to choose in AWS?

Which technology to choose in AWS? Which technology to choose in AWS? RDS / Aurora / Roll-your-own April 17, 2018 Daniel Kowalewski Senior Technical Operations Engineer Percona 1 2017 Percona AWS MySQL options RDS for MySQL Aurora MySQL

More information

Introduction to MySQL InnoDB Cluster

Introduction to MySQL InnoDB Cluster 1 / 148 2 / 148 3 / 148 Introduction to MySQL InnoDB Cluster MySQL High Availability made easy Percona Live Europe - Dublin 2017 Frédéric Descamps - MySQL Community Manager - Oracle 4 / 148 Safe Harbor

More information

Consistent Reads Using ProxySQL and GTID. Santa Clara, California April 23th 25th, 2018

Consistent Reads Using ProxySQL and GTID. Santa Clara, California April 23th 25th, 2018 Consistent Reads Using ProxySQL and GTID Santa Clara, California April 23th 25th, 2018 Disclaimer I am not René Cannaò @lefred MySQL Community Manager / Oracle the one who provided a hint for this not

More information

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

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

More information

Everything You Need to Know About MySQL Group Replication

Everything You Need to Know About MySQL Group Replication Everything You Need to Know About MySQL Group Replication Luís Soares (luis.soares@oracle.com) Principal Software Engineer, MySQL Replication Lead Copyright 2017, Oracle and/or its affiliates. All rights

More information

ProxySQL Tutorial. With a GPL license! High Performance & High Availability Proxy for MySQL. Santa Clara, California April 23th 25th, 2018

ProxySQL Tutorial. With a GPL license! High Performance & High Availability Proxy for MySQL. Santa Clara, California April 23th 25th, 2018 ProxySQL Tutorial High Performance & High Availability Proxy for MySQL With a GPL license! Santa Clara, California April 23th 25th, 2018 Who we are René Cannaò ProxySQL Founder Derek Downey Director of

More information

MySQL usage of web applications from 1 user to 100 million. Peter Boros RAMP conference 2013

MySQL usage of web applications from 1 user to 100 million. Peter Boros RAMP conference 2013 MySQL usage of web applications from 1 user to 100 million Peter Boros RAMP conference 2013 Why MySQL? It's easy to start small, basic installation well under 15 minutes. Very popular, supported by a lot

More information

Galera in MariaDB 10.4 State of the Art and Plans

Galera in MariaDB 10.4 State of the Art and Plans Galera in MariaDB 10.4 State of the Art and Plans Seppo Jaakola Codership Seppo Jaakola One of the Founders of Codership Codership Galera Replication developers Partner of MariaDB for developing and supporting

More information

Choosing a MySQL High Availability Solution. Marcos Albe, Percona Inc. Live Webinar June 2017

Choosing a MySQL High Availability Solution. Marcos Albe, Percona Inc. Live Webinar June 2017 Choosing a MySQL High Availability Solution Marcos Albe, Percona Inc. Live Webinar June 2017 Agenda What is availability Components to build an HA solution HA options in the MySQL ecosystem Failover/Routing

More information

How Percona Contributes to Open Source Database Ecosystem. Peter Zaitsev 5 October 2016

How Percona Contributes to Open Source Database Ecosystem. Peter Zaitsev 5 October 2016 How Percona Contributes to Open Source Database Ecosystem Peter Zaitsev 5 October 2016 I am Passionate about Open Source Passionate about Database Technology Passionate about finding best Solutions 2 Percona

More information

Lessons from database failures

Lessons from database failures Lessons from database failures Colin Charles, Chief Evangelist, Percona Inc. colin.charles@percona.com / byte@bytebot.net http://www.bytebot.net/blog/ @bytebot on Twitter Percona Webminar 18 January 2017

More information

Percona Software & Services Update

Percona Software & Services Update Percona Software & Services Update Q2 2017 Peter Zaitsev,CEO Percona Technical Webinars May 4, 2017 Why? Talking to Many Users and Customers Getting What have you been up to? Question This is a way to

More information

ProxySQL Tools Documentation

ProxySQL Tools Documentation ProxySQL Tools Documentation Release 0.3.12 TwinDB Development Team Dec 29, 2017 Contents 1 ProxySQL Tools 3 1.1 Features.................................................. 3 1.2 Credits..................................................

More information

MySQL High Availability Solutions. Alex Poritskiy Percona

MySQL High Availability Solutions. Alex Poritskiy Percona MySQL High Availability Solutions Alex Poritskiy Percona The Five 9s of Availability Clustering & Geographical Redundancy Clustering Technologies Replication Technologies Well-Managed disasters power failures

More information

High availability with MariaDB TX: The definitive guide

High availability with MariaDB TX: The definitive guide High availability with MariaDB TX: The definitive guide MARCH 2018 Table of Contents Introduction - Concepts - Terminology MariaDB TX High availability - Master/slave replication - Multi-master clustering

More information

Deploying PXC in Kubernetes / Openshift. Alexander Rubin, Percona

Deploying PXC in Kubernetes / Openshift. Alexander Rubin, Percona Deploying PXC in Kubernetes / Openshift Alexander Rubin, Percona About me Working with MySQL for 10-15 years Started at MySQL AB, Sun Microsystems, Oracle (MySQL Consulting) Joined Percona in 2013 What

More information

Percona Software & Services Update

Percona Software & Services Update Percona Software & Services Update Q4 2016 Peter Zaitsev,CEO Percona Technical Webinars January 12, 2017 Why? Talking to Many Users and Customers Getting What have you been up to? Question This is a way

More information

MySQL Replication: What's New In MySQL 5.7 and MySQL 8. Luís Soares Software Development Director MySQL Replication

MySQL Replication: What's New In MySQL 5.7 and MySQL 8. Luís Soares Software Development Director MySQL Replication MySQL Replication: What's New In MySQL 5.7 and MySQL 8 Luís Soares Software Development Director MySQL Replication Tuesday, 24th April 2018, Santa Clara, CA, USA Copyright 2018, Oracle and/or its affiliates.

More information

What s New in MySQL and MongoDB Ecosystem Year 2017

What s New in MySQL and MongoDB Ecosystem Year 2017 What s New in MySQL and MongoDB Ecosystem Year 2017 Peter Zaitsev CEO Percona University, Ghent June 22 nd, 2017 1 In This Presentation Few Words about Percona Few Words about Percona University Program

More information

MySQL 5.6: Advantages in a Nutshell. Peter Zaitsev, CEO, Percona Percona Technical Webinars March 6, 2013

MySQL 5.6: Advantages in a Nutshell. Peter Zaitsev, CEO, Percona Percona Technical Webinars March 6, 2013 MySQL 5.6: Advantages in a Nutshell Peter Zaitsev, CEO, Percona Percona Technical Webinars March 6, 2013 About Presentation Brief Overview Birds eye view of features coming in 5.6 Mainly documentation

More information

Migrating and living on RDS/Aurora. life after Datacenters

Migrating and living on RDS/Aurora. life after Datacenters Migrating and living on RDS/Aurora life after Datacenters Why to migrate to RDS - It is AWS native - A lot of complexity is handled by Amazon - It is Someone Else s Problem (SEP ) - You have someone to

More information

Why Choose Percona Server For MySQL? Tyler Duzan

Why Choose Percona Server For MySQL? Tyler Duzan Why Choose Percona Server For MySQL? Tyler Duzan Product Manager Who Am I? My name is Tyler Duzan Formerly an operations engineer for more than 12 years focused on security and automation Now a Product

More information

MySQL Replication. Rick Golba and Stephane Combaudon April 15, 2015

MySQL Replication. Rick Golba and Stephane Combaudon April 15, 2015 MySQL Replication Rick Golba and Stephane Combaudon April 15, 2015 Agenda What is, and what is not, MySQL Replication Replication Use Cases Types of replication Replication lag Replication errors Replication

More information

Written by Marco Tusa Tuesday, 21 November :21 - Last Updated Tuesday, 21 November :48

Written by Marco Tusa Tuesday, 21 November :21 - Last Updated Tuesday, 21 November :48 ProxySQL PXC Single Writer Mode and auto failover re-bootstrap Tuesday 2 November 207 2 - Last Updated Tuesday 2 November 207 248 Overview ProxySQL had been adopted as solution for HA in place of HAProxy

More information

ProxySQL Tutorial. Percona Live Europe With a GPL license! High Performance & High Availability Proxy for MySQL

ProxySQL Tutorial. Percona Live Europe With a GPL license! High Performance & High Availability Proxy for MySQL Percona Live Europe 2016 ProxySQL Tutorial High Performance & High Availability Proxy for MySQL With a GPL license! Amsterdam, Netherlands October 3 5, 2016 Visit us at booth #102 Who we are David Turner

More information

Split your database. Nicolai Plum Booking.com Database Engineering

Split your database. Nicolai Plum Booking.com Database Engineering Split your database Nicolai Plum Booking.com Database Engineering Before 2 After 3 Why? Size Query time, query latency conflicting workloads Business or architecture reasons Regulatory compliance Easier

More information

MySQL Group Replication in a nutshell

MySQL Group Replication in a nutshell 1 / 126 2 / 126 MySQL Group Replication in a nutshell the core of MySQL InnoDB Cluster Oracle Open World September 19th 2016 Frédéric Descamps MySQL Community Manager 3 / 126 Safe Harbor Statement The

More information

Migrating to Aurora MySQL and Monitoring with PMM. Percona Technical Webinars August 1, 2018

Migrating to Aurora MySQL and Monitoring with PMM. Percona Technical Webinars August 1, 2018 Migrating to Aurora MySQL and Monitoring with PMM Percona Technical Webinars August 1, 2018 Introductions Introduction Vineet Khanna (Autodesk) Senior Database Engineer vineet.khanna@autodesk.com Tate

More information

Why we re excited about MySQL 8

Why we re excited about MySQL 8 Why we re excited about MySQL 8 Practical Look for Devs and Ops Peter Zaitsev, CEO, Percona February 4nd, 2018 FOSDEM 1 In the Presentation Practical view on MySQL 8 Exciting things for Devs Exciting things

More information

Aurora, RDS, or On-Prem, Which is right for you

Aurora, RDS, or On-Prem, Which is right for you Aurora, RDS, or On-Prem, Which is right for you Kathy Gibbs Database Specialist TAM Katgibbs@amazon.com Santa Clara, California April 23th 25th, 2018 Agenda RDS Aurora EC2 On-Premise Wrap-up/Recommendation

More information

MySQL Replication Advanced Features In 20 minutes

MySQL Replication Advanced Features In 20 minutes MySQL Replication Advanced Features In 20 minutes Peter Zaitsev, CEO FOSDEM, Brussels, Belgium February 2nd, 2019 1 Question #1 Who in this room is using some kind of MySQL Replication? 2 Question #2 Which

More information

Design Patterns for Large- Scale Data Management. Robert Hodges OSCON 2013

Design Patterns for Large- Scale Data Management. Robert Hodges OSCON 2013 Design Patterns for Large- Scale Data Management Robert Hodges OSCON 2013 The Start-Up Dilemma 1. You are releasing Online Storefront V 1.0 2. It could be a complete bust 3. But it could be *really* big

More information

MySQL at Scale at Square

MySQL at Scale at Square MySQL at Scale at Square Bill Karwin, Square Inc. October, 2018 1 Square An honest financial network for everyone Global: USA, Canada, UK, Japan, Australia Payment transaction data stored in MySQL We are

More information

MySQL Performance Optimization and Troubleshooting with PMM. Peter Zaitsev, CEO, Percona

MySQL Performance Optimization and Troubleshooting with PMM. Peter Zaitsev, CEO, Percona MySQL Performance Optimization and Troubleshooting with PMM Peter Zaitsev, CEO, Percona In the Presentation Practical approach to deal with some of the common MySQL Issues 2 Assumptions You re looking

More information

Architecture and Design of MySQL Powered Applications. Peter Zaitsev CEO, Percona Highload Moscow, Russia 31 Oct 2014

Architecture and Design of MySQL Powered Applications. Peter Zaitsev CEO, Percona Highload Moscow, Russia 31 Oct 2014 Architecture and Design of MySQL Powered Applications Peter Zaitsev CEO, Percona Highload++ 2014 Moscow, Russia 31 Oct 2014 About Percona 2 Open Source Software for MySQL Ecosystem Percona Server Percona

More information

Migrating To MySQL The Live Database Upgrade Guide

Migrating To MySQL The Live Database Upgrade Guide Migrating To MySQL 5.7 - The Live Database Upgrade Guide October 4, 2016 Krzysztof Książek Severalnines krzysztof@severalnines.com 1 Agenda! Why upgrading to MySQL 5.7?! Preparing an upgrade - changes

More information

Improvements in MySQL 5.5 and 5.6. Peter Zaitsev Percona Live NYC May 26,2011

Improvements in MySQL 5.5 and 5.6. Peter Zaitsev Percona Live NYC May 26,2011 Improvements in MySQL 5.5 and 5.6 Peter Zaitsev Percona Live NYC May 26,2011 State of MySQL 5.5 and 5.6 MySQL 5.5 Released as GA December 2011 Percona Server 5.5 released in April 2011 Proven to be rather

More information

InnoDB Scalability Limits. Peter Zaitsev, Vadim Tkachenko Percona Inc MySQL Users Conference 2008 April 14-17, 2008

InnoDB Scalability Limits. Peter Zaitsev, Vadim Tkachenko Percona Inc MySQL Users Conference 2008 April 14-17, 2008 InnoDB Scalability Limits Peter Zaitsev, Vadim Tkachenko Percona Inc MySQL Users Conference 2008 April 14-17, 2008 -2- Who are the Speakers? Founders of Percona Inc MySQL Performance and Scaling consulting

More information

Oracle Exam 1z0-883 MySQL 5.6 Database Administrator Version: 8.0 [ Total Questions: 100 ]

Oracle Exam 1z0-883 MySQL 5.6 Database Administrator Version: 8.0 [ Total Questions: 100 ] s@lm@n Oracle Exam 1z0-883 MySQL 5.6 Database Administrator Version: 8.0 [ Total Questions: 100 ] Oracle 1z0-883 : Practice Test Question No : 1 Consider the Mysql Enterprise Audit plugin. You are checking

More information

MariaDB 10.3 vs MySQL 8.0. Tyler Duzan, Product Manager Percona

MariaDB 10.3 vs MySQL 8.0. Tyler Duzan, Product Manager Percona MariaDB 10.3 vs MySQL 8.0 Tyler Duzan, Product Manager Percona Who Am I? My name is Tyler Duzan Formerly an operations engineer for more than 12 years focused on security and automation Now a Product Manager

More information

Percona Software & Services Update

Percona Software & Services Update Percona Software & Services Update Q3 2016 Peter Zaitsev,CEO Percona Technical Webinars September 28, 2016 Why? Talking to Many Users and Customers Ge6ng What have you been up to? Ques@on This is a way

More information

MySQL Replication : advanced features in all flavours. Giuseppe Maxia Quality Assurance Architect at

MySQL Replication : advanced features in all flavours. Giuseppe Maxia Quality Assurance Architect at MySQL Replication : advanced features in all flavours Giuseppe Maxia Quality Assurance Architect at VMware @datacharmer 1 About me Who s this guy? Giuseppe Maxia, a.k.a. "The Data Charmer" QA Architect

More information

To Shard or Not to Shard That is the question! Peter Zaitsev April 21, 2016

To Shard or Not to Shard That is the question! Peter Zaitsev April 21, 2016 To Shard or Not to Shard That is the question! Peter Zaitsev April 21, 2016 Story Let s start with the story 2 First things to decide Before you decide how to shard you d best understand whether or not

More information

Switching to Innodb from MyISAM. Matt Yonkovit Percona

Switching to Innodb from MyISAM. Matt Yonkovit Percona Switching to Innodb from MyISAM Matt Yonkovit Percona -2- DIAMOND SPONSORSHIPS THANK YOU TO OUR DIAMOND SPONSORS www.percona.com -3- Who We Are Who I am Matt Yonkovit Principal Architect Veteran of MySQL/SUN/Percona

More information

The Hazards of Multi-writing in a Dual-Master Setup

The Hazards of Multi-writing in a Dual-Master Setup The Hazards of Multi-writing in a Dual-Master Setup Jay Janssen MySQL Consulting Lead November 15th, 2012 Explaining the Problem Rules of the Replication Road A given MySQL instance: Can be both a master

More information

MySQL High Availability. Michael Messina Senior Managing Consultant, Rolta-AdvizeX /

MySQL High Availability. Michael Messina Senior Managing Consultant, Rolta-AdvizeX / MySQL High Availability Michael Messina Senior Managing Consultant, Rolta-AdvizeX mmessina@advizex.com / mike.messina@rolta.com Introduction Michael Messina Senior Managing Consultant Rolta-AdvizeX, Working

More information

MySQL Replication Update

MySQL Replication Update MySQL Replication Update Lars Thalmann Development Director MySQL Replication, Backup & Connectors OSCON, July 2011 MySQL Releases MySQL 5.1 Generally Available, November 2008 MySQL

More information

ProxySQL's Internals

ProxySQL's Internals ProxySQL's Internals What is ProxySQL? A "Layer 7" database proxy MySQL / ClickHouse protocol aware High Performance High Availability Architecture Overview Clients connect to ProxySQL Requests are evaluated

More information

Using MHA in and out of the Cloud. Garrick Peterson Percona University, Toronto 2013

Using MHA in and out of the Cloud. Garrick Peterson Percona University, Toronto 2013 Using MHA in and out of the Cloud Garrick Peterson Percona University, Toronto 2013 Agenda Who am I MHA Overview HA In the Cloud IP Management options Simple use case What do we use Recommendations GTID

More information

HA for OpenStack: Connecting the dots

HA for OpenStack: Connecting the dots HA for OpenStack: Connecting the dots Raghavan Rags Srinivas Rackspace OpenStack Meetup, Washington DC on Jan. 23 rd 2013 Rags Solutions Architect at Rackspace for OpenStack-based Rackspace Private Cloud

More information

What s New in MySQL 5.7 Geir Høydalsvik, Sr. Director, MySQL Engineering. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

What s New in MySQL 5.7 Geir Høydalsvik, Sr. Director, MySQL Engineering. Copyright 2015, Oracle and/or its affiliates. All rights reserved. What s New in MySQL 5.7 Geir Høydalsvik, Sr. Director, MySQL Engineering Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes

More information

Mysql Cluster Global Schema Lock

Mysql Cluster Global Schema Lock Mysql Cluster Global Schema Lock This definitely was not the case with MySQL Cluster 7.3.x. (Warning) NDB: Could not acquire global schema lock (4009)Cluster Failure 2015-03-25 14:51:53. Using High-Speed

More information

Jailbreaking MySQL Replication Featuring Tungsten Replicator. Robert Hodges, CEO, Continuent

Jailbreaking MySQL Replication Featuring Tungsten Replicator. Robert Hodges, CEO, Continuent Jailbreaking MySQL Replication Featuring Tungsten Robert Hodges, CEO, Continuent About Continuent / Continuent is the leading provider of data replication and clustering for open source relational databases

More information

Developing SQL Databases (762)

Developing SQL Databases (762) Developing SQL Databases (762) Design and implement database objects Design and implement a relational database schema Design tables and schemas based on business requirements, improve the design of tables

More information

ZFS and MySQL on Linux, the Sweet Spots

ZFS and MySQL on Linux, the Sweet Spots ZFS and MySQL on Linux, the Sweet Spots ZFS User Conference 2018 Jervin Real 1 / 50 MySQL The World's Most Popular Open Source Database 2 / 50 ZFS Is MySQL for storage. 3 / 50 ZFS + MySQL MySQL Needs A

More information

1Z Oracle. MySQL 5 Database Administrator Certified Professional Part I

1Z Oracle. MySQL 5 Database Administrator Certified Professional Part I Oracle 1Z0-873 MySQL 5 Database Administrator Certified Professional Part I Download Full Version : http://killexams.com/pass4sure/exam-detail/1z0-873 A. Use the --log-queries-indexes option. B. Use the

More information

MyRocks Storage Engine Status Update. Sergei Petrunia MariaDB Meetup New York February, 2018

MyRocks Storage Engine Status Update. Sergei Petrunia MariaDB Meetup New York February, 2018 MyRocks Storage Engine Status Update Sergei Petrunia MariaDB Meetup New York February, 2018 2 Plan What MyRocks is How it is provided in upstream Packaging MyRocks in MariaDB MyRocks

More information

Accelerate MySQL for Demanding OLAP and OLTP Use Case with Apache Ignite December 7, 2016

Accelerate MySQL for Demanding OLAP and OLTP Use Case with Apache Ignite December 7, 2016 Accelerate MySQL for Demanding OLAP and OLTP Use Case with Apache Ignite December 7, 2016 Nikita Ivanov CTO and Co-Founder GridGain Systems Peter Zaitsev CEO and Co-Founder Percona About the Presentation

More information

Microclouds for Fragmented Markets Getting OpenStack everywhere!

Microclouds for Fragmented Markets Getting OpenStack everywhere! Microclouds for Fragmented Markets Getting OpenStack everywhere! Benjamin Diaz - Cloud Engineer at Whitestack 1 What are fragmented markets? A marketplace where there is no one company that can exert enough

More information

MySQL Group Replication. Bogdan Kecman MySQL Principal Technical Engineer

MySQL Group Replication. Bogdan Kecman MySQL Principal Technical Engineer MySQL Group Replication Bogdan Kecman MySQL Principal Technical Engineer Bogdan.Kecman@oracle.com 1 Safe Harbor Statement The following is intended to outline our general product direction. It is intended

More information

Scale out Read Only Workload by sharing data files of InnoDB. Zhai weixiang Alibaba Cloud

Scale out Read Only Workload by sharing data files of InnoDB. Zhai weixiang Alibaba Cloud Scale out Read Only Workload by sharing data files of InnoDB Zhai weixiang Alibaba Cloud Who Am I - My Name is Zhai Weixiang - I joined in Alibaba in 2011 and has been working on MySQL since then - Mainly

More information

MongoDB and Mysql: Which one is a better fit for me? Room 204-2:20PM-3:10PM

MongoDB and Mysql: Which one is a better fit for me? Room 204-2:20PM-3:10PM MongoDB and Mysql: Which one is a better fit for me? Room 204-2:20PM-3:10PM About us Adamo Tonete MongoDB Support Engineer Agustín Gallego MySQL Support Engineer Agenda What are MongoDB and MySQL; NoSQL

More information

MySQL 8.0: Atomic DDLs Implementation and Impact

MySQL 8.0: Atomic DDLs Implementation and Impact MySQL 8.0: Atomic DDLs Implementation and Impact Ståle Deraas, Senior Development Manager Oracle, MySQL 26 Sept 2017 Copyright 2017, Oracle and/or its its affiliates. All All rights reserved. Safe Harbor

More information

The MySQL Ecosystem - understanding it, not running away from it!

The MySQL Ecosystem - understanding it, not running away from it! The MySQL Ecosystem - understanding it, not running away from it! Colin Charles, Chief Evangelist, Percona Inc. colin.charles@percona.com / byte@bytebot.net http://bytebot.net/blog/ @bytebot on Twitter

More information

MyRocks in MariaDB. Sergei Petrunia MariaDB Tampere Meetup June 2018

MyRocks in MariaDB. Sergei Petrunia MariaDB Tampere Meetup June 2018 MyRocks in MariaDB Sergei Petrunia MariaDB Tampere Meetup June 2018 2 What is MyRocks Hopefully everybody knows by now A storage engine based on RocksDB LSM-architecture Uses less

More information

'information_schema' When Using Lock Tables

'information_schema' When Using Lock Tables Access Denied For User To Database 'information_schema' When Using Lock Tables In this tutorial, we will show you how to import a MySQL Database using phpmyadmin. to database 'information_schema' when

More information

Performance improvements in MySQL 5.5

Performance improvements in MySQL 5.5 Performance improvements in MySQL 5.5 Percona Live Feb 16, 2011 San Francisco, CA By Peter Zaitsev Percona Inc -2- Performance and Scalability Talk about Performance, Scalability, Diagnostics in MySQL

More information

MySQL In the Cloud. Migration, Best Practices, High Availability, Scaling. Peter Zaitsev CEO Los Angeles MySQL Meetup June 12 th, 2017.

MySQL In the Cloud. Migration, Best Practices, High Availability, Scaling. Peter Zaitsev CEO Los Angeles MySQL Meetup June 12 th, 2017. MySQL In the Cloud Migration, Best Practices, High Availability, Scaling Peter Zaitsev CEO Los Angeles MySQL Meetup June 12 th, 2017 1 Let me start. With some Questions! 2 Question One How Many of you

More information

Upgrading MySQL Best Practices. Apr 11-14, 2011 MySQL Conference and Expo Santa Clara,CA by Peter Zaitsev, Percona Inc

Upgrading MySQL Best Practices. Apr 11-14, 2011 MySQL Conference and Expo Santa Clara,CA by Peter Zaitsev, Percona Inc Upgrading MySQL Best Practices Apr 11-14, 2011 MySQL Conference and Expo Santa Clara,CA by Peter Zaitsev, Percona Inc MySQL Upgrade How many of you have performed MySQL upgrade? Home many of you have done

More information

Backup & Restore. Maximiliano Bubenick Sr Remote DBA

Backup & Restore. Maximiliano Bubenick Sr Remote DBA Backup & Restore Maximiliano Bubenick Sr Remote DBA Agenda Why backups? Backup Types Raw Backups Logical Backups Binlog mirroring Backups Locks Tips Why Backups? Why Backups? At some point something will

More information

Binlog Servers (and MySQL) at Booking.com. Jean-François Gagné jeanfrancois DOT gagne AT booking.com Presented at Percona Live Santa Clara 2015

Binlog Servers (and MySQL) at Booking.com. Jean-François Gagné jeanfrancois DOT gagne AT booking.com Presented at Percona Live Santa Clara 2015 Binlog Servers (and MySQL) at Booking.com Jean-François Gagné jeanfrancois DOT gagne AT booking.com Presented at Percona Live Santa Clara 2015 Booking.com 2 Booking.com Based in Amsterdam since 1996 Online

More information

MySQL InnoDB Cluster & Group Replication in a Nutshell: Hands-On Tutorial

MySQL InnoDB Cluster & Group Replication in a Nutshell: Hands-On Tutorial 1 / 152 2 / 152 3 / 152 MySQL InnoDB Cluster & Group Replication in a Nutshell: Hands-On Tutorial Percona Live Europe 2017 - Dublin Frédéric Descamps - MySQL Community Manager - Oracle Kenny Gryp - MySQL

More information

PXC loves firewalls (and System Admins loves iptables) Written by Marco Tusa Monday, 18 June :00 - Last Updated Wednesday, 18 July :25

PXC loves firewalls (and System Admins loves iptables) Written by Marco Tusa Monday, 18 June :00 - Last Updated Wednesday, 18 July :25 Let them stay together. In the last YEARS, I have seen quite often that users, when installing a product such as PXC, instead of spending five minutes to understand what to do just run iptable s -F and

More information

Binlog Servers at Booking.com. Jean-François Gagné jeanfrancois DOT gagne AT booking.com

Binlog Servers at Booking.com. Jean-François Gagné jeanfrancois DOT gagne AT booking.com Binlog Servers at Booking.com Jean-François Gagné jeanfrancois DOT gagne AT booking.com Presented at Percona Live Amsterdam 2015 Booking.com 1 Booking.com Based in Amsterdam since 1996 Online Hotel and

More information