SlideShare a Scribd company logo
1 of 87
Download to read offline
Open Source India 2014 
MySQL High Availability with 
Replication New Features 
Shivji Kumar Jha (shivji.jha@oracle.com) 
Manish Kumar (manish.4.kumar@oracle.com) 
Software Developer, MySQL Replication Team 
2 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Safe Harbor Statement 
The following is intended to outline our general product direction. It is 
intended for information purposes only, and may not be incorporated 
into any contract. It is not a commitment to deliver any material, code, 
or functionality, and should not be relied upon in making purchasing 
decisions. The development, release, and timing of any features or 
functionality described for Oracle’s products remains at the sole 
discretion of Oracle. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Program Agenda 
Background 
Performance 
Usability 
Flexibility 
Consistency 
Extras 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
0 
1 
2 
3 
4 
5
Program Agenda 
Background 
Performance 
Usability 
Flexibility 
Consistency 
Extras 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
0 
1 
2 
3 
4 
5
Background: Replication Components 
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Sender 
thread 
Receiver 
thread 
Applier 
Threads 
Network
Background: What is Replication Used For? 
S 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Read scale-out 
M S 
S 
S 
M 
write clients read clients 
read clients 
write clients 
More 
reads? 
More 
slaves!
What about write scale-out? 
More 
writes? 
More 
Masters? 
M? 
M M? 
write clients write clients 
M? 
MySQL Fabric helps sharding your data with MySQL... 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Redundancy: If master crashes, promote slave to master 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
C 
B 
A 
Background: What is Replication Used For? 
C 
B 
CraAsh 
C 
B 
A 
B is the 
new master 
Uh Oh! Whew!
Background: What is Replication Used For? 
On-line Backup and Reporting 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
M 
S 
write clients 
 business intelligent client apps 
 reporting client apps 
 big queries client apps
Background: What is Replication Used For? 
CB 
CA AB 
Image from 
www.ginkgomaps.com 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Program Agenda 
Background 
Performance 
Usability 
Flexibility 
Consistency 
Extras 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
1 
2 
3 
4 
5 
6
Performance 
— Higher Master Throughput. 
 Improved concurrency between Sender and user threads, 
 More Sender thread enhancements... 
— Higher Slave Throughout. 
 MySQL- 5.7.2: Multi-Threaded Slave (MTS) Timestamp based Applier. 
 MySQL Labs: Enhanced MTS Timestamp based Applier. 
 Options to Fine Tune Binlog Group Commit and Multi-Threaded Applier 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Improved concurrency b/w Sender and user threads 
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads
Improved concurrency b/w Sender and user threads 
Concurrent reads by the sender thread with ongoing writes from user 
threads. 
— Sender thread does not block user sessions more than necessary. 
— Higher throughput for both sender threads and user sessions. 
Sender Thread Reads Binary Log User Thread Writes to Binary Log 
Sender Thread Reads Binary Log 
User Thread Writes to Binary Log 
Time 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
pre 5.7.2 
5.7.2+
More Sender Thread Enhancements 
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads
More Sender Thread Enhancements 
 Send buffer is not allocated and freed every time an event is sent. 
 When sender threads require larger send buffer → buffer grows as needed. 
 When buffer is larger than needed→ buffer shrinks dynamically. 
 Together with the sender thread enhancements released on MySQL 5.7.2: 
— increase master scalability; 
— Master, with dump threads attached, copes better with peak loads; 
— Separate semisync ACK receiver thread (details later!) 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
More Sender Thread Enhancements 
 Ad hoc microbenchmark using 
mysqlslap 
 1M queries, concurrency=200, 
commit=1 
 N slaves attached (fake slaves 
using remote mysqlbinlogs) 
 48 cores HT / 512 GB RAM / HDD 
0 1 5 10 20 30 40 50 100 
16000 
14000 
12000 
10000 
8000 
6000 
4000 
2000 
 Small number of slaves: no difference between 5.6 and 5.7. 
 Larger number of slaves: 5.7 is able to sustain the same throughput while 
5.6 is not. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
0 
Master's Throughput 
MySQL 5.6.16 
MySQL 5.7.4 
Number of Slaves 
QpS
This was the case when we released MySQL 5.6 GA. 
 Up to 5x more throughput 
with 10 sysbench schemas. 
 Changes to each schema 
applied and committed 
independently by worker 
threads (both in SBR and 
RBR). 
0 1 2 3 4 5 6 10 24 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
300 
250 
200 
150 
100 
50 
0 
Slave Throughput 
Number Worker Threads 
QpS 
Higher Slave Throughput (MySQL-5.6)
Higher Slave Throughput (MySQL-5.6) 
“It's the bee's knees! We've been 
using it at VividCortex in 
production and it works great.” 
– Baron Schwartz, CEO, VividCortex 
https://vividcortex.com/blog/2014/03/17/multi-threaded-replication-in-mysql/ 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Higher Slave Throughput (MySQL-5.7) 
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads
Higher Slave Throughput 
Timestamp based Multi-threaded Slave (MTS) Applier 
● Leverage parallelization information obtained from the execution on the 
master. 
● Transactions that prepare on the same “version” of the database, are 
assigned the same timestamp. 
● Meanwhile, at the slave: 
● Transactions with the same timestamp can be executed in parallel; 
● Concurrent transactions commit independently, thus no waiting involved. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Higher Slave Throughput 
 Supports statement-based or row-based formats. 
 Scheduling policy controlled through: 
mysql> SET slave_parallel_type= [logical_clock|database] 
— logical_clock - means schedule based on the prepare timestamp. 
— database - the scheduling policy from 5.6 (concurrency control done per 
database). 
 Work to improve slave scalability continues, does not stop here. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads 
Enhanced Scheduling Policy (MTS)
Enhanced Scheduling Policy (MTS) 
Sysbench / oltp test / 48 clients / 
10M rows 
SSD / 48 core HT / 512 GB RAM 
GTIDs / Crash-safe 
Numbers from 
mysql-5.7.5-labs-preview 
UPDATED 
TO BE 0 4 16 50 200 
Up to 6X performance improvement vs single threaded slave 
without any changes to the application 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
5000 
4500 
4000 
3500 
3000 
2500 
2000 
1500 
1000 
500 
0 
Transactions per Second (TPS) 
TPS while replaying 300 seconds of accumulated load from the master. 
Baseline 
100 clients – 5.7.5-labs 
200 clients – 5.7.5-labs 
Number of Worker Threads 
Transactions Per Second
BGC tuning options – MTS Enhancers 
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads
BGC tuning options – MTS Enhancers 
Sysbench / oltp test / 48 clients / 
10M rows 
SSD / 48 core HT / 512 GB RAM 
GTIDs / Crash-safe 
Numbers from 
mysql-5.7.4-labs-mts 
Transactions Per Second 
small commit delay 
large commit delay 
0 5 10 15 20 25 30 35 40 45 50 
4500 
4000 
3500 
3000 
2500 
2000 
1500 
1000 
500 
0 
Number of Slave Worker Threads 
TPS 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
BGC tuning options – MTS Enhancers 
By tuning BGC on the master, we 
get more parallelism on the slave. 
Tuning means more transactions 
preparing together (no magic 
formula – highly dependent on 
hardware and workload). 
Ongoing work on improving MTS and 
on the analysis of experimental 
results. 
Transactions Per Second 
small commit delay 
large commit delay 
0 5 10 15 20 25 30 35 40 45 50 
4500 
4000 
3500 
3000 
2500 
2000 
1500 
1000 
500 
0 
Number of Slave Worker Threads 
TPS 
 6X slave throughput – large commit delay 
 3X slave throughput – small commit delay 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Program Agenda 
Background 
Performance 
Usability 
Flexibility 
Consistency 
Extras 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
1 
2 
3 
4 
5 
6
Better Replication Monitoring 
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads
Better Replication Monitoring 
Performance Schema Replication Tables 
● Access monitoring information through an SQL interface. 
● Write stored functions or procedures with input from replication internals. 
● Logically unrelated information into different places. 
● Flexible and easier to extend and adapt as new feature get into the 
server. 
● More user friendly names identifying the monitoring fields. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Better Replication Monitoring 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Connection 
Configuration 
Connection 
Status 
Execution 
Configuration 
Execution 
Status 
Slave Status 
Applier / Coordinator 
Status 
Workers 
Status
Program Agenda 
Background 
Performance 
Usability 
Flexibility 
Consistency 
Extras 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
1 
2 
3 
4 
5 
6
Semi-sync Replication – Wait for Multiple ACKs 
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads
Semi-sync Replication – Wait for Multiple ACKs 
 Master does not commit transaction until it receives N ACKs from N slaves. 
 Dynamically settable: 
mysql> SET GLOBAL rpl_semi_sync_master_wait_for_slave_count= N 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Master 
T1: COMMIT 
Slave 2 relaylog 
ACK 
Time 
Slave 1 relaylog 
ACK 
T1: COMMIT 
succeeds 
mysql> SET GLOBAL rpl_semi_sync_master_wait_for_slave_count= 2
relay log 
Storing GTIDs In a Table 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
B 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads 
gtid_executed gtid_executed
Storing GTIDs In a Table 
Use Cases 
 Slaves can use GTIDs with binary logs disabled. 
— Slaves that are never candidates to become a master can still use GTIDs 
for auto positioning. 
 GTIDs are more resilient to unexpected deletion of binary logs. 
— If the DBA decides to delete all binlogs but the most recent one, GTID 
history is still preserved. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Storing GTIDs In a Table 
Mechanics 
 GTIDs are saved into a mysql system table. 
CREATE TABLE gtid_executed( 
source_uuid CHAR(36) NOT NULL, 
interval_start BIGINT NOT NULL, 
interval_end BIGINT NOT NULL, 
PRIMARY KEY(source_uuid, interval_start) 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
);
Storing GTIDs In a Table 
Mechanics 
 If binary log is enabled, gtids are first stored on the binary log and then 
copied to the table on binlog rotation or shutdown. 
 If binary log is disabled, gtids are stored in the table on commit. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Preserve Commit Order (MTS) 
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads
Preserve Commit Order (MTS) 
 Multi-threaded Applier May be Instructed to Preserve Commit Order. 
— Applier Threads will commit in the same order transactions appear in the 
relay log. 
— Order is enforced at the expense of performance degradation. 
— This is controllable through the new global option/variable: 
--slave-preserve-commit-order. Default is FALSE. 
mysql> SET GLOBAL slave_preserve_commit_order= [TRUE|FALSE] 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Redirect to new Master without interrupting the 
Applier 
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads
Redirect to new Master without interrupting the 
Applier 
Change master to B from A without stopping the applier threads. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
C 
B 
A 
C 
B 
CraAsh 
C 
B 
A 
B is the 
new master 
Uh Oh! Whew!
Redirect to new Master without interrupting the 
Applier 
Change master to M2 from M1 without stopping the applier threads. 
Uh Oh! Whew! 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
C 
B 
A 
C 
B 
CraAsh 
C 
B 
A 
DBA did not need C to stop applying its 
relay log to change C's master from A to B.
Redirect to new Master without interrupting the 
Applier 
 More “onlineness” during fail-over: 
mysql> STOP SLAVE IO_TRHEAD; 
mysql> CHANGE MASTER TO MASTER_HOST='master2', …; 
mysql> START SLAVE IO_THREAD; 
 Stopping, changing master and restarting the receiver thread is all done 
while the applier thread is running. 
 Change applier properties while the receiver thread is working: 
mysql> STOP SLAVE SQL_TRHEAD; 
mysql> CHANGE MASTER TO MASTER_DELAY=3600, …; 
mysql> START SLAVE SQL_THREAD; 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Dynamic Slave Replication Filters 
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads
Dynamic Slave Replication Filters 
Change Slave's Replication Filters dynamically. 
— No need to stop and restart slave for establishing new replication filtering 
rules. 
— All slave filters are supported. 
mysql> CHANGE REPLICATION FILTER REPLICATE_DO_DB= (db1, db2) 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Multi-Source Replication 
M M 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
S 
Slave can have more than one master. 
Feature preview based on 5.7 is available 
on labs.mysql.com . 
M M 
The need for gathering data in a central server: 
 Integrated backup; 
 Complex queries for analytics purposes;
Multi-Source Replication 
 A server (slave) can replicate from multiple sources (masters). 
 Multiple channels (channel: connection thread, relay log, applier threads) that 
can be stopped started individually. 
 Integrated with Multi-threaded Slave: each channel has its own multi-threaded 
applier set of threads. 
 Integrated with the new P_S tables. 
— replication_execute_status_by_coordinator shows multiple entries, one per 
channel/source applier. 
— replication_connection_status shows multiple entries, one per connection to 
different sources. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Multi-Source Replication 
 Integrated with GTIDs. 
 Integrated with crash-safe tables. 
— Progress state is stored in these tables for recoverability purposes. 
 Works with semisync replication. 
— Working on further improving the integration. 
 Virtually no limit on the number of sources (capped to 256, but can be changed 
if server binary is rebuilt). 
 Able to manage each source separately. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Program Agenda 
Background 
Performance 
Usability 
Flexibility 
Consistency 
Extras 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
0 
1 
2 
3 
4 
5
Loss-less Semi-sync Replication 
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads
Loss-less Semi-sync Replication 
 Master waits for slave's ACK before committing (as opposed to: master waits 
for slave's ACK after committing). 
— Therefore, concurrent transactions do not externalize changes while waiting 
for ACK. 
 Should a master fail, then any transaction that it may have externalized is also 
persisted on a slave. 
 User can choose between the original semisync behavior and the new one. 
mysql> SET rpl_semi_sync_master_wait_point= [AFTER_SYNC|AFTER_COMMIT] 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Loss-less Semi-sync Replication 
prepare commit 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Master 
Slave 
execute binlog 
relaylog 
T1: INSERT INTO t1 VALUES (1000) 
ACK 
Time 
T1 
T2: SELECT * FROM t1; 
T2 
empty set
Semi-sync Replication – ACK Receiver Thread 
relay log 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Insert... 
Insert... 
B 
binary log 
Insert... 
Insert... 
A 
binary log 
Client 
Network 
Sender 
thread 
Receiver 
thread 
Applier 
Threads 
ACK 
Receiver 
thread
Semi-sync Replication – ACK Receiver Thread 
 Consecutive transactions do not block each other while waiting for ACKs 
— Transaction t1 and t2 are sent immediately to the slave by the sender thread 
— ACKs are received only by a special thread 
— Transaction t2 does not include t1 round trip in its semisync overall latency 
 Thread starts when semisync is activated 
mysql> SET GLOBAL rpl_semi_master_enabled= ON 
 Thread stops when semisync is deactivated 
mysql> SET GLOBAL rpl_semi_master_enabled= ON 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Semi-sync Replication in MySQL 5.7 
“Semi-sync in MySQL 5.7 looks like a great 
improvement. [...] With MySQL 5.7, I’d be 
much more apt to recommend semi-sync as 
an option than in previous releases. Thanks 
to Oracle for investing here.” 
– Jay Janssen, MySQL Consulting Manager, Percona Inc 
http://www.percona.com/blog/2014/05/27/semi-sync-replication-performance-mysql-5-7-4-dmr/ 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Introducing MySQL Group Replication 
 Multi-master update everywhere with conflict resolution. 
 Automatic distributed member recovery 
— When a server joins the group, it gets all the missing transactions before actually 
start serving requests. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Group-Based Replication Plugin 
M M M M M 
MySQL 
Server 
API 
Replication 
Plugin 
Group Comm. 
System (Corosync) 
Group Comm. 
System (Corosync) 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Group-Based Replication Plugin 
Update ... 
M M M M M 
Application issues an update. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Group-Based Replication Plugin 
M M M M M 
Replication 
Events 
Application issues an update. 
Master executes and multi/broadcasts 
the update to the other servers. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Group-Based Replication Plugin 
M M M M M 
Application issues an update. 
Master executes and multi/broadcasts 
the update to the other servers. 
Servers receive same transaction in the 
same order and check for conflicts. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Group-Based Replication Plugin 
M M M M M 
Application issues an update. 
Master executes and multi/broadcasts 
the update to the other servers. 
Servers receive same transaction in the 
same order and check for conflicts. 
All servers, independently, decide to 
commit the transaction – no conflicts. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Group-Based Replication Plugin 
Application issues an update. 
Master executes and multi/broadcasts 
the update to the other servers. 
Servers receive same transaction in the 
same order and check for conflicts. 
All servers, independently, decide to 
commit the transaction – no conflicts. 
Originating master replies to the 
application. 
M M M M M 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
MySQL Group Replication: Use Cases 
● Automatic group membership management and failure detection 
- No need for server fail-over 
● No single point of failure 
- Automatic reconfiguration 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Under the hood 
● Each server can belong to a group. 
● The Group is identified by a name which is the Group UUID string, so group behaves 
like a single server. 
● The Group UUID is used to log transactions. 
● Whenever a server joins or leaves, it will start a new stable period in time on which 
servers can agree on distributed decisions. A special message called View Message 
is sent to each group member notifying that. 
● Server join/leave can be issue manually or by scripts by DBA. 
● Server leave can be caused also by node failures. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Under the hood 
 Current used group communication toolkit is Corosync. It provides: 
— Virtual synchrony guarantees for creating replicated state machines. 
 Replicated state machine simple definition: 
— If a set of processes with the same initial state receives the same set of deterministic 
messages at the same order, them will reach the same state. 
 All write operations are sent to all group members for certification. 
 Read operations are only local. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
COMMIT dbv: 2 
OK 
OK 
OK 
Certification - Positive 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
s1 
s2 
dbv: 1 UPDATE 
dbv: 2 
s3 
dbv: 2 
COMMIT 
COMMIT 
cv: 1 1 >= 1 
1 >= 1 
1 >= 1 
cv: 1 
cv: 1 
dbv: 1 
dbv: 1 
cv: 2 
cv: 2 
cv: 2 
s ← server 
v ← snapshot version 
sn ← certifier sequence number (write set version)
T1: COMMIT dbv: 2 
Certification - Negative 
OK 
OK 
T2: UPDATE cv: 2 
OK 
KO 
KO 
KO 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
s1 
s2 
dbv: 1 T1: UPDATE 
dbv: 2 
s3 
dbv: 2 
T1: COMMIT 
T1: COMMIT 
cv: 1 
cv: 1 
cv: 1 
1 >= 1 
1 >= 1 
1 >= 1 
cv: 2 
cv: 2 
1 >= 2 
1 >= 2 
1 >= 2 
dbv: 1 
dbv: 1 
s ← server 
v ← snapshot version 
sn ← certifier sequence number (write set version)
Automated distributed member recovery 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
R1 
R2 
R3 
R4 
GCS 
R1 
R2 
R3 
R4 
R4 joins the group. 
GCS
Automated distributed member recovery 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
R1 
R2 
R3 
R4 
R1 is R4 Donor 
GCS 
R1 
R2 
R3 
R4 
GCS
Automated distributed member recovery 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
R1 
R2 
R3 
R4 
GCS 
R1 
R2 
R3 
R4 
GCS
Automated distributed member recovery 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
R1 
R2 
R3 
R4 
GCS 
R1 
R2 
R3 
R4 
R4 has caught up 
with the view! 
GCS
Automated distributed member recovery 
R1 
R2 
R3 
R4 
GCS 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
R1 
R2 
R3 
R4 
GCS 
Execute buffered 
transactions from the view.
PERFORMANCE SCHEMA TABLE 
– REPLICATION_NODE_STATUS 
● Statistics regarding Applier and Certifier module. 
– REPLICATION_CONNECTION_NODES 
● Information regarding different nodes in the group and its 
connection details 
– REPLICATION_CONNECTION_STATUS 
● Extended table to give details about the group connection status. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Replication Monitoring: replication_node_status 
node1> SELECT * FROM performance_schema.replication_node_statusG 
*************************** 1. row *************************** 
GROUP_NAME: 8a84f397-aaa4-18df-89ab-c70aa9823561 
NODE_ID: 2af09cb1-3e46-11e4-9e45-ecf4bb227f3b 
TRANSACTIONS_IN_QUEUE: 0 
CERTIFIED_TRANSACTIONS: 12 
POSITIVELY_CERTIFIED: 7 
NEGATIVELY_CERTIFIED: 5 
CERTIFICATION_DB_SIZE: 6 
STABLE_SET: 8a84f397-aaa4-18df-89ab-c70aa9823561:1-7 
LAST_CERTIFIED_TRANSACTION: 8a84f397-aaa4-18df-89ab-c70aa9823561:7 
APPLIER_MODULE_STATUS: ON 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Replication Monitoring: replication_node_status 
node1> SELECT * FROM performance_schema.replication_connection_nodesG 
*************************** 1. row *************************** 
GROUP_NAME 8a94f357-aab4-11df-86ab-c80aa9429573 
NODE_ID 597dbb72-3e2c-11e4-9d9d-ecf4bb227f3b 
NODE_HOST nightfury 
NODE_PORT 13000 
NODE_STATE ONLINE 
*************************** 2. row *************************** 
GROUP_NAME 8a94f357-aab4-11df-86ab-c80aa9429573 
NODE_ID 59efb8a1-3e2c-11e4-9d9d-ecf4bb227f3b 
NODE_HOST nightfury 
NODE_PORT 13001 
NODE_STATE ONLINE 
*************************** 3. row *************************** 
GROUP_NAME 8a94f357-aab4-11df-86ab-c80aa9429573 
NODE_ID 5a706f6b-3e2c-11e4-9d9d-ecf4bb227f3b 
NODE_HOST nightfury 
NODE_PORT 13002 
NODE_STATE RECOVERING 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Replication Monitoring: replication_node_status 
node1> SELECT * FROM performance_schema.replication_connection_statusG 
*************************** 1. row *************************** 
GROUP_NAME: 8a94f357-aab4-11df-86ab-c80aa9429563 
SOURCE_UUID: 8a94f357-aab4-11df-86ab-c80aa9429563 
THREAD_ID: NULL 
SERVICE_STATE: ON 
COUNT_RECEIVED_HEARTBEATS: 0 
LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00 
RECEIVED_TRANSACTION_SET: 
LAST_ERROR_NUMBER: 0 
LAST_ERROR_MESSAGE: 
LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00 
TOTAL_MESSAGES_RECEIVED: 9 
TOTAL_MESSAGES_SENT: 5 
TOTAL_BYTES_RECEIVED: 1891 
TOTAL_BYTES_SENT: 1065 
LAST_MESSAGE_TIMESTAMP: 2014-09-23 09:20:26 
MAX_MESSAGE_LENGTH: 358 
MIN_MESSAGE_LENGTH: 51 
VIEW_ID: 2 
NUMBER_OF_NODES: 2 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
 Only transactional engines are supported (currently only InnoDB). 
 All tables must have primary key 
 GTID must be enabled. 
 Only deterministic DDL is allowed. 
 Optimistic execution: transactions may abort on COMMIT. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Limitations
Program Agenda 
Background 
Performance 
Usability 
Flexibility 
Consistency 
Extras 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
0 
1 
2 
3 
4 
5
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
References 
 Read a feature preview of MySQL Group replication on Luis' blog: 
http://mysqlhighavailability.com/mysql-group-replication-hello-world/ 
 Read about how to get started with MySQL Group replication on Pedro's blog: 
http://mysqlhighavailability.com/getting-started-with-mysql-group-replication/ 
 Read about Transaction life cycle in MySQL Group replication on Nuno's blog: 
http://mysqlhighavailability.com/mysql-group-replication-transaction-life-cycle-explained/ 
 Read about Distributed recovery in MySQL Group Replication on Pedro's blog: 
http://mysqlhighavailability.com/distributed-recovery-behind-the-scenes/ 
 Read about Monitoring for MySQL Group Replication on Manish's blog: 
http://mysqlhighavailability.com/mysql-group-replication-monitoring/ 
 Read about Corosync and Group Communication details on Tiago's blog: 
http://mysqlhighavailability.com/group-communication-behind-the-scenes/ 
http://mysqlhighavailability.com/mysql-group-replication-a-small-corosync-guide/ 
 Read about Testing of MySQL Group Replication on Manish's blog: 
http://mysqlhighavailability.com/mysql-group-replication-testing/
References: Read about the 5.7 DMRs Replication 
Features 
 Read more about P_S tables for replication on Shiv's blog: 
http://shivjijha.blogspot.com/2013/09/Monitoring-Replication-with-the-NEW-performance-schema-tables.html 
 Read more about Intra-Schema Multi-threaded Slave on Rohit's blog: 
http://geek.rohitkalhans.com/2013/09/enhancedMTS-deepdive.html 
◾ Read more about Semisync enhancements on Libing's blog: 
http://my-replication-life.blogspot.com/2013/09/dump-thread-enhancement.html 
http://my-replication-life.blogspot.pt/2013/09/loss-less-semi-synchronous-replication.html 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
References: Read about the 5.7 DMRs Replication 
Features 
◾ Read more about mysqlbinlog idempotent mode on Rohit's blog: 
http://binlogtorelaylog.blogspot.com/2013/05/mysqlbinlog-idemmpotent-mode.html 
◾ Read more about mysqlbinlog –rewrite-db option on Manish's blog: 
http://manishthe.blogspot.com/2013/05/introduction-with-wonderful-and-best.html 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
References: Read about the 5.7 DMRs Replication 
Features 
 Read more on Dynamic Replication Filters on Venkat's blog: 
http://my-s-q-l.blogspot.com/2013/12/Making-MySQL-Slave-Replication-Filters-Dynamic.html 
 Read more on Semi-sync Multiple ACKs on Libing's blog: 
http://my-replication-life.blogspot.com/2013/12/enforced-semi-synchronous-replication.html 
 Read more on SSL options for mysqlbinlog on João's blog: 
http://jmysqlrep.blogspot.com/2013/12/mysql-57-mysqlbinlog-now-supports-ssl.html 
 Read more on Semisync ACK thread receiver on Libing's blog: 
http://my-replication-life.blogspot.com/2014/03/faster-semisync-replication.html 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
References: Read about the 5.7 DMRs Replication 
Features 
 Read more on Flexible Change Master on Shiv's blog: 
http://work.shivjijha.com/2014/04/change-master-without-stopping-slave.html 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
References: Read about the 5.7 DMRs Replication 
Features 
 Read more about Multi-source replication on Rith's blog: 
http://on-mysql-replication.blogspot.com/2013/09/feature-preview-mysql-multi-source-replication.html 
 Read a lot more on : mysqlhighavailability.com 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
MySQL High Availability with Replication New Features

More Related Content

What's hot

Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability MattersMatt Lord
 
MySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMark Swarbrick
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMark Swarbrick
 
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/NetMySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/NetMark Swarbrick
 
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...Miguel Araújo
 
Netherlands Tech Tour 02 - MySQL Fabric
Netherlands Tech Tour 02 -   MySQL FabricNetherlands Tech Tour 02 -   MySQL Fabric
Netherlands Tech Tour 02 - MySQL FabricMark Swarbrick
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLOlivier DASINI
 
Real time Messages at Scale with Apache Kafka and Couchbase
Real time Messages at Scale with Apache Kafka and CouchbaseReal time Messages at Scale with Apache Kafka and Couchbase
Real time Messages at Scale with Apache Kafka and CouchbaseWill Gardella
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL ContainersMatt Lord
 
MySQL High Availibility Solutions
MySQL High Availibility SolutionsMySQL High Availibility Solutions
MySQL High Availibility SolutionsMark Swarbrick
 
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?Miguel Araújo
 
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&PierreKafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&PierreStreamNative
 
MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)Olivier DASINI
 
Connecting Apache Kafka With Mule ESB
Connecting Apache Kafka With Mule ESBConnecting Apache Kafka With Mule ESB
Connecting Apache Kafka With Mule ESBJitendra Bafna
 
Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1Knoldus Inc.
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News Ted Wennmark
 
How Apache Kafka is transforming Hadoop, Spark and Storm
How Apache Kafka is transforming Hadoop, Spark and StormHow Apache Kafka is transforming Hadoop, Spark and Storm
How Apache Kafka is transforming Hadoop, Spark and StormEdureka!
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMario Beck
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)Mario Beck
 
Introduction to Kafka and Zookeeper
Introduction to Kafka and ZookeeperIntroduction to Kafka and Zookeeper
Introduction to Kafka and ZookeeperRahul Jain
 

What's hot (20)

Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability Matters
 
MySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt Intro
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats new
 
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/NetMySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
 
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
 
Netherlands Tech Tour 02 - MySQL Fabric
Netherlands Tech Tour 02 -   MySQL FabricNetherlands Tech Tour 02 -   MySQL Fabric
Netherlands Tech Tour 02 - MySQL Fabric
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
 
Real time Messages at Scale with Apache Kafka and Couchbase
Real time Messages at Scale with Apache Kafka and CouchbaseReal time Messages at Scale with Apache Kafka and Couchbase
Real time Messages at Scale with Apache Kafka and Couchbase
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL Containers
 
MySQL High Availibility Solutions
MySQL High Availibility SolutionsMySQL High Availibility Solutions
MySQL High Availibility Solutions
 
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
 
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&PierreKafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
 
MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)
 
Connecting Apache Kafka With Mule ESB
Connecting Apache Kafka With Mule ESBConnecting Apache Kafka With Mule ESB
Connecting Apache Kafka With Mule ESB
 
Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
 
How Apache Kafka is transforming Hadoop, Spark and Storm
How Apache Kafka is transforming Hadoop, Spark and StormHow Apache Kafka is transforming Hadoop, Spark and Storm
How Apache Kafka is transforming Hadoop, Spark and Storm
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
 
Introduction to Kafka and Zookeeper
Introduction to Kafka and ZookeeperIntroduction to Kafka and Zookeeper
Introduction to Kafka and Zookeeper
 

Viewers also liked

Advanced mysql replication techniques
Advanced mysql replication techniquesAdvanced mysql replication techniques
Advanced mysql replication techniquesGiuseppe Maxia
 
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio  in a nutshell - MySQL InnoDB ClusterMySQL Group Replicatio  in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio in a nutshell - MySQL InnoDB ClusterFrederic Descamps
 
New awesome features in MySQL 5.7
New awesome features in MySQL 5.7New awesome features in MySQL 5.7
New awesome features in MySQL 5.7Zhaoyang Wang
 
MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQL InnoDB Cluster 미리보기 (remote cluster test)MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQL InnoDB Cluster 미리보기 (remote cluster test)Seungmin Yu
 
Haute disponibilité my sql avec group réplication
Haute disponibilité my sql avec group réplicationHaute disponibilité my sql avec group réplication
Haute disponibilité my sql avec group réplicationFrederic Descamps
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationNuno Carvalho
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationFrederic Descamps
 
Group Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication CoreGroup Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication CoreAlfranio Júnior
 
MySQL 5.7 Fabric: Introduction to High Availability and Sharding
MySQL 5.7 Fabric: Introduction to High Availability and Sharding MySQL 5.7 Fabric: Introduction to High Availability and Sharding
MySQL 5.7 Fabric: Introduction to High Availability and Sharding Ulf Wendel
 
MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017Dave Stokes
 
MySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMark Swarbrick
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group ReplicationUlf Wendel
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMatt Lord
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialKenny Gryp
 
Multi Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ VerisureMulti Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ VerisureKenny Gryp
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group ReplicationKenny Gryp
 

Viewers also liked (17)

Advanced mysql replication techniques
Advanced mysql replication techniquesAdvanced mysql replication techniques
Advanced mysql replication techniques
 
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio  in a nutshell - MySQL InnoDB ClusterMySQL Group Replicatio  in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
 
New awesome features in MySQL 5.7
New awesome features in MySQL 5.7New awesome features in MySQL 5.7
New awesome features in MySQL 5.7
 
MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQL InnoDB Cluster 미리보기 (remote cluster test)MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQL InnoDB Cluster 미리보기 (remote cluster test)
 
Haute disponibilité my sql avec group réplication
Haute disponibilité my sql avec group réplicationHaute disponibilité my sql avec group réplication
Haute disponibilité my sql avec group réplication
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group Replication
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
 
Group Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication CoreGroup Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication Core
 
MySQL 5.7 Fabric: Introduction to High Availability and Sharding
MySQL 5.7 Fabric: Introduction to High Availability and Sharding MySQL 5.7 Fabric: Introduction to High Availability and Sharding
MySQL 5.7 Fabric: Introduction to High Availability and Sharding
 
MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017
 
MySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMySQL 5.6 Replication Webinar
MySQL 5.6 Replication Webinar
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 
MySQL Cluster Basics
MySQL Cluster BasicsMySQL Cluster Basics
MySQL Cluster Basics
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn Tutorial
 
Multi Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ VerisureMulti Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ Verisure
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 

Similar to MySQL High Availability with Replication New Features

Multi source replication pdf
Multi source replication pdfMulti source replication pdf
Multi source replication pdfMysql User Camp
 
MySQL Group Replication @osi days 2014
MySQL Group Replication @osi days 2014MySQL Group Replication @osi days 2014
MySQL Group Replication @osi days 2014Manish Kumar
 
MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014Sanjay Manwani
 
MySQL Fabric - High Availability & Automated Sharding for MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQLMySQL Fabric - High Availability & Automated Sharding for MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQLTed Wennmark
 
20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech UpdatesRyusuke Kajiyama
 
Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7
Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7
Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7Mark Swarbrick
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesTarique Saleem
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL SupportMysql User Camp
 
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)Andrew Morgan
 
MySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsMySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsTed Wennmark
 
2_MySQL_Cluster_Introduction.pdf
2_MySQL_Cluster_Introduction.pdf2_MySQL_Cluster_Introduction.pdf
2_MySQL_Cluster_Introduction.pdfHaiping Li
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015Sanjay Manwani
 
MySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of ChoiceMySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of ChoiceMark Swarbrick
 
MySQL High Availability - Managing Farms of Distributed Servers
MySQL High Availability - Managing Farms of Distributed ServersMySQL High Availability - Managing Farms of Distributed Servers
MySQL High Availability - Managing Farms of Distributed ServersNarayanan Venkateswaran
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQLTed Wennmark
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLMario Beck
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementMark Matthews
 
TWJUG August, What's new in MySQL 5.7 RC
TWJUG August, What's new in MySQL 5.7 RCTWJUG August, What's new in MySQL 5.7 RC
TWJUG August, What's new in MySQL 5.7 RCRyusuke Kajiyama
 
RMOUG MySQL 5.7 New Features
RMOUG MySQL 5.7 New FeaturesRMOUG MySQL 5.7 New Features
RMOUG MySQL 5.7 New FeaturesDave Stokes
 
A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014Anuj Sahni
 

Similar to MySQL High Availability with Replication New Features (20)

Multi source replication pdf
Multi source replication pdfMulti source replication pdf
Multi source replication pdf
 
MySQL Group Replication @osi days 2014
MySQL Group Replication @osi days 2014MySQL Group Replication @osi days 2014
MySQL Group Replication @osi days 2014
 
MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014
 
MySQL Fabric - High Availability & Automated Sharding for MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQLMySQL Fabric - High Availability & Automated Sharding for MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQL
 
20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates
 
Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7
Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7
Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
 
MySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsMySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA options
 
2_MySQL_Cluster_Introduction.pdf
2_MySQL_Cluster_Introduction.pdf2_MySQL_Cluster_Introduction.pdf
2_MySQL_Cluster_Introduction.pdf
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015
 
MySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of ChoiceMySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of Choice
 
MySQL High Availability - Managing Farms of Distributed Servers
MySQL High Availability - Managing Farms of Distributed ServersMySQL High Availability - Managing Farms of Distributed Servers
MySQL High Availability - Managing Farms of Distributed Servers
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance Improvement
 
TWJUG August, What's new in MySQL 5.7 RC
TWJUG August, What's new in MySQL 5.7 RCTWJUG August, What's new in MySQL 5.7 RC
TWJUG August, What's new in MySQL 5.7 RC
 
RMOUG MySQL 5.7 New Features
RMOUG MySQL 5.7 New FeaturesRMOUG MySQL 5.7 New Features
RMOUG MySQL 5.7 New Features
 
A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014
 

More from Shivji Kumar Jha

Navigating Transactions: ACID Complexity in Modern Databases
Navigating Transactions: ACID Complexity in Modern DatabasesNavigating Transactions: ACID Complexity in Modern Databases
Navigating Transactions: ACID Complexity in Modern DatabasesShivji Kumar Jha
 
Druid Summit 2023 : Changing Druid Ingestion from 3 hours to 5 minutes
Druid Summit 2023 : Changing Druid Ingestion from 3 hours to 5 minutesDruid Summit 2023 : Changing Druid Ingestion from 3 hours to 5 minutes
Druid Summit 2023 : Changing Druid Ingestion from 3 hours to 5 minutesShivji Kumar Jha
 
pulsar-platformatory-meetup-2.pptx
pulsar-platformatory-meetup-2.pptxpulsar-platformatory-meetup-2.pptx
pulsar-platformatory-meetup-2.pptxShivji Kumar Jha
 
Pulsar Summit Asia 2022 - Streaming wars and How Apache Pulsar is acing the b...
Pulsar Summit Asia 2022 - Streaming wars and How Apache Pulsar is acing the b...Pulsar Summit Asia 2022 - Streaming wars and How Apache Pulsar is acing the b...
Pulsar Summit Asia 2022 - Streaming wars and How Apache Pulsar is acing the b...Shivji Kumar Jha
 
Pulsar Summit Asia 2022 - Keeping on top of hybrid cloud usage with Pulsar
Pulsar Summit Asia 2022 - Keeping on top of hybrid cloud usage with PulsarPulsar Summit Asia 2022 - Keeping on top of hybrid cloud usage with Pulsar
Pulsar Summit Asia 2022 - Keeping on top of hybrid cloud usage with PulsarShivji Kumar Jha
 
Pulsar summit asia 2021: Designing Pulsar for Isolation
Pulsar summit asia 2021: Designing Pulsar for IsolationPulsar summit asia 2021: Designing Pulsar for Isolation
Pulsar summit asia 2021: Designing Pulsar for IsolationShivji Kumar Jha
 
Event sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event StoreEvent sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event StoreShivji Kumar Jha
 
Apache Con 2021 Structured Data Streaming
Apache Con 2021 Structured Data StreamingApache Con 2021 Structured Data Streaming
Apache Con 2021 Structured Data StreamingShivji Kumar Jha
 
Apache Con 2021 : Apache Bookkeeper Key Value Store and use cases
Apache Con 2021 : Apache Bookkeeper Key Value Store and use casesApache Con 2021 : Apache Bookkeeper Key Value Store and use cases
Apache Con 2021 : Apache Bookkeeper Key Value Store and use casesShivji Kumar Jha
 
How pulsar stores data at Pulsar-na-summit-2021.pptx (1)
How pulsar stores data at Pulsar-na-summit-2021.pptx (1)How pulsar stores data at Pulsar-na-summit-2021.pptx (1)
How pulsar stores data at Pulsar-na-summit-2021.pptx (1)Shivji Kumar Jha
 
Pulsar Summit Asia - Structured Data Stream with Apache Pulsar
Pulsar Summit Asia - Structured Data Stream with Apache PulsarPulsar Summit Asia - Structured Data Stream with Apache Pulsar
Pulsar Summit Asia - Structured Data Stream with Apache PulsarShivji Kumar Jha
 
Pulsar Summit Asia - Running a secure pulsar cluster
Pulsar Summit Asia -  Running a secure pulsar clusterPulsar Summit Asia -  Running a secure pulsar cluster
Pulsar Summit Asia - Running a secure pulsar clusterShivji Kumar Jha
 
lessons from managing a pulsar cluster
 lessons from managing a pulsar cluster lessons from managing a pulsar cluster
lessons from managing a pulsar clusterShivji Kumar Jha
 
FOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group ReplicationFOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group ReplicationShivji Kumar Jha
 
MySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and ScalabilityMySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and ScalabilityShivji Kumar Jha
 
MySQL User Camp: MySQL Cluster
MySQL User Camp: MySQL ClusterMySQL User Camp: MySQL Cluster
MySQL User Camp: MySQL ClusterShivji Kumar Jha
 
Open source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source ReplicationOpen source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source ReplicationShivji Kumar Jha
 
MySQL User Camp: Multi-threaded Slaves
MySQL User Camp: Multi-threaded SlavesMySQL User Camp: Multi-threaded Slaves
MySQL User Camp: Multi-threaded SlavesShivji Kumar Jha
 

More from Shivji Kumar Jha (20)

Navigating Transactions: ACID Complexity in Modern Databases
Navigating Transactions: ACID Complexity in Modern DatabasesNavigating Transactions: ACID Complexity in Modern Databases
Navigating Transactions: ACID Complexity in Modern Databases
 
Druid Summit 2023 : Changing Druid Ingestion from 3 hours to 5 minutes
Druid Summit 2023 : Changing Druid Ingestion from 3 hours to 5 minutesDruid Summit 2023 : Changing Druid Ingestion from 3 hours to 5 minutes
Druid Summit 2023 : Changing Druid Ingestion from 3 hours to 5 minutes
 
osi-oss-dbs.pptx
osi-oss-dbs.pptxosi-oss-dbs.pptx
osi-oss-dbs.pptx
 
pulsar-platformatory-meetup-2.pptx
pulsar-platformatory-meetup-2.pptxpulsar-platformatory-meetup-2.pptx
pulsar-platformatory-meetup-2.pptx
 
Pulsar Summit Asia 2022 - Streaming wars and How Apache Pulsar is acing the b...
Pulsar Summit Asia 2022 - Streaming wars and How Apache Pulsar is acing the b...Pulsar Summit Asia 2022 - Streaming wars and How Apache Pulsar is acing the b...
Pulsar Summit Asia 2022 - Streaming wars and How Apache Pulsar is acing the b...
 
Pulsar Summit Asia 2022 - Keeping on top of hybrid cloud usage with Pulsar
Pulsar Summit Asia 2022 - Keeping on top of hybrid cloud usage with PulsarPulsar Summit Asia 2022 - Keeping on top of hybrid cloud usage with Pulsar
Pulsar Summit Asia 2022 - Keeping on top of hybrid cloud usage with Pulsar
 
Pulsar summit asia 2021: Designing Pulsar for Isolation
Pulsar summit asia 2021: Designing Pulsar for IsolationPulsar summit asia 2021: Designing Pulsar for Isolation
Pulsar summit asia 2021: Designing Pulsar for Isolation
 
Event sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event StoreEvent sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event Store
 
Apache Con 2021 Structured Data Streaming
Apache Con 2021 Structured Data StreamingApache Con 2021 Structured Data Streaming
Apache Con 2021 Structured Data Streaming
 
Apache Con 2021 : Apache Bookkeeper Key Value Store and use cases
Apache Con 2021 : Apache Bookkeeper Key Value Store and use casesApache Con 2021 : Apache Bookkeeper Key Value Store and use cases
Apache Con 2021 : Apache Bookkeeper Key Value Store and use cases
 
How pulsar stores data at Pulsar-na-summit-2021.pptx (1)
How pulsar stores data at Pulsar-na-summit-2021.pptx (1)How pulsar stores data at Pulsar-na-summit-2021.pptx (1)
How pulsar stores data at Pulsar-na-summit-2021.pptx (1)
 
Pulsar Summit Asia - Structured Data Stream with Apache Pulsar
Pulsar Summit Asia - Structured Data Stream with Apache PulsarPulsar Summit Asia - Structured Data Stream with Apache Pulsar
Pulsar Summit Asia - Structured Data Stream with Apache Pulsar
 
Pulsar Summit Asia - Running a secure pulsar cluster
Pulsar Summit Asia -  Running a secure pulsar clusterPulsar Summit Asia -  Running a secure pulsar cluster
Pulsar Summit Asia - Running a secure pulsar cluster
 
lessons from managing a pulsar cluster
 lessons from managing a pulsar cluster lessons from managing a pulsar cluster
lessons from managing a pulsar cluster
 
FOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group ReplicationFOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group Replication
 
MySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and ScalabilityMySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and Scalability
 
MySQL User Camp: MySQL Cluster
MySQL User Camp: MySQL ClusterMySQL User Camp: MySQL Cluster
MySQL User Camp: MySQL Cluster
 
MySQL User Camp: GTIDs
MySQL User Camp: GTIDsMySQL User Camp: GTIDs
MySQL User Camp: GTIDs
 
Open source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source ReplicationOpen source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source Replication
 
MySQL User Camp: Multi-threaded Slaves
MySQL User Camp: Multi-threaded SlavesMySQL User Camp: Multi-threaded Slaves
MySQL User Camp: Multi-threaded Slaves
 

Recently uploaded

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

MySQL High Availability with Replication New Features

  • 1.
  • 2. Open Source India 2014 MySQL High Availability with Replication New Features Shivji Kumar Jha (shivji.jha@oracle.com) Manish Kumar (manish.4.kumar@oracle.com) Software Developer, MySQL Replication Team 2 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 3. Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 4. Program Agenda Background Performance Usability Flexibility Consistency Extras Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 0 1 2 3 4 5
  • 5. Program Agenda Background Performance Usability Flexibility Consistency Extras Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 0 1 2 3 4 5
  • 6. Background: Replication Components relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Sender thread Receiver thread Applier Threads Network
  • 7. Background: What is Replication Used For? S Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Read scale-out M S S S M write clients read clients read clients write clients More reads? More slaves!
  • 8. What about write scale-out? More writes? More Masters? M? M M? write clients write clients M? MySQL Fabric helps sharding your data with MySQL... Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 9. Redundancy: If master crashes, promote slave to master Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | C B A Background: What is Replication Used For? C B CraAsh C B A B is the new master Uh Oh! Whew!
  • 10. Background: What is Replication Used For? On-line Backup and Reporting Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | M S write clients  business intelligent client apps  reporting client apps  big queries client apps
  • 11. Background: What is Replication Used For? CB CA AB Image from www.ginkgomaps.com Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 12. Program Agenda Background Performance Usability Flexibility Consistency Extras Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 1 2 3 4 5 6
  • 13. Performance — Higher Master Throughput.  Improved concurrency between Sender and user threads,  More Sender thread enhancements... — Higher Slave Throughout.  MySQL- 5.7.2: Multi-Threaded Slave (MTS) Timestamp based Applier.  MySQL Labs: Enhanced MTS Timestamp based Applier.  Options to Fine Tune Binlog Group Commit and Multi-Threaded Applier Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 14. Improved concurrency b/w Sender and user threads relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads
  • 15. Improved concurrency b/w Sender and user threads Concurrent reads by the sender thread with ongoing writes from user threads. — Sender thread does not block user sessions more than necessary. — Higher throughput for both sender threads and user sessions. Sender Thread Reads Binary Log User Thread Writes to Binary Log Sender Thread Reads Binary Log User Thread Writes to Binary Log Time Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | pre 5.7.2 5.7.2+
  • 16. More Sender Thread Enhancements relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads
  • 17. More Sender Thread Enhancements  Send buffer is not allocated and freed every time an event is sent.  When sender threads require larger send buffer → buffer grows as needed.  When buffer is larger than needed→ buffer shrinks dynamically.  Together with the sender thread enhancements released on MySQL 5.7.2: — increase master scalability; — Master, with dump threads attached, copes better with peak loads; — Separate semisync ACK receiver thread (details later!) Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 18. More Sender Thread Enhancements  Ad hoc microbenchmark using mysqlslap  1M queries, concurrency=200, commit=1  N slaves attached (fake slaves using remote mysqlbinlogs)  48 cores HT / 512 GB RAM / HDD 0 1 5 10 20 30 40 50 100 16000 14000 12000 10000 8000 6000 4000 2000  Small number of slaves: no difference between 5.6 and 5.7.  Larger number of slaves: 5.7 is able to sustain the same throughput while 5.6 is not. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 0 Master's Throughput MySQL 5.6.16 MySQL 5.7.4 Number of Slaves QpS
  • 19. This was the case when we released MySQL 5.6 GA.  Up to 5x more throughput with 10 sysbench schemas.  Changes to each schema applied and committed independently by worker threads (both in SBR and RBR). 0 1 2 3 4 5 6 10 24 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 300 250 200 150 100 50 0 Slave Throughput Number Worker Threads QpS Higher Slave Throughput (MySQL-5.6)
  • 20. Higher Slave Throughput (MySQL-5.6) “It's the bee's knees! We've been using it at VividCortex in production and it works great.” – Baron Schwartz, CEO, VividCortex https://vividcortex.com/blog/2014/03/17/multi-threaded-replication-in-mysql/ Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 21. Higher Slave Throughput (MySQL-5.7) relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads
  • 22. Higher Slave Throughput Timestamp based Multi-threaded Slave (MTS) Applier ● Leverage parallelization information obtained from the execution on the master. ● Transactions that prepare on the same “version” of the database, are assigned the same timestamp. ● Meanwhile, at the slave: ● Transactions with the same timestamp can be executed in parallel; ● Concurrent transactions commit independently, thus no waiting involved. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 23. Higher Slave Throughput  Supports statement-based or row-based formats.  Scheduling policy controlled through: mysql> SET slave_parallel_type= [logical_clock|database] — logical_clock - means schedule based on the prepare timestamp. — database - the scheduling policy from 5.6 (concurrency control done per database).  Work to improve slave scalability continues, does not stop here. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 24. relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads Enhanced Scheduling Policy (MTS)
  • 25. Enhanced Scheduling Policy (MTS) Sysbench / oltp test / 48 clients / 10M rows SSD / 48 core HT / 512 GB RAM GTIDs / Crash-safe Numbers from mysql-5.7.5-labs-preview UPDATED TO BE 0 4 16 50 200 Up to 6X performance improvement vs single threaded slave without any changes to the application Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 5000 4500 4000 3500 3000 2500 2000 1500 1000 500 0 Transactions per Second (TPS) TPS while replaying 300 seconds of accumulated load from the master. Baseline 100 clients – 5.7.5-labs 200 clients – 5.7.5-labs Number of Worker Threads Transactions Per Second
  • 26. BGC tuning options – MTS Enhancers relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads
  • 27. BGC tuning options – MTS Enhancers Sysbench / oltp test / 48 clients / 10M rows SSD / 48 core HT / 512 GB RAM GTIDs / Crash-safe Numbers from mysql-5.7.4-labs-mts Transactions Per Second small commit delay large commit delay 0 5 10 15 20 25 30 35 40 45 50 4500 4000 3500 3000 2500 2000 1500 1000 500 0 Number of Slave Worker Threads TPS Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 28. BGC tuning options – MTS Enhancers By tuning BGC on the master, we get more parallelism on the slave. Tuning means more transactions preparing together (no magic formula – highly dependent on hardware and workload). Ongoing work on improving MTS and on the analysis of experimental results. Transactions Per Second small commit delay large commit delay 0 5 10 15 20 25 30 35 40 45 50 4500 4000 3500 3000 2500 2000 1500 1000 500 0 Number of Slave Worker Threads TPS  6X slave throughput – large commit delay  3X slave throughput – small commit delay Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 29. Program Agenda Background Performance Usability Flexibility Consistency Extras Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 1 2 3 4 5 6
  • 30. Better Replication Monitoring relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads
  • 31. Better Replication Monitoring Performance Schema Replication Tables ● Access monitoring information through an SQL interface. ● Write stored functions or procedures with input from replication internals. ● Logically unrelated information into different places. ● Flexible and easier to extend and adapt as new feature get into the server. ● More user friendly names identifying the monitoring fields. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 32. Better Replication Monitoring Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Connection Configuration Connection Status Execution Configuration Execution Status Slave Status Applier / Coordinator Status Workers Status
  • 33. Program Agenda Background Performance Usability Flexibility Consistency Extras Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 1 2 3 4 5 6
  • 34. Semi-sync Replication – Wait for Multiple ACKs relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads
  • 35. Semi-sync Replication – Wait for Multiple ACKs  Master does not commit transaction until it receives N ACKs from N slaves.  Dynamically settable: mysql> SET GLOBAL rpl_semi_sync_master_wait_for_slave_count= N Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Master T1: COMMIT Slave 2 relaylog ACK Time Slave 1 relaylog ACK T1: COMMIT succeeds mysql> SET GLOBAL rpl_semi_sync_master_wait_for_slave_count= 2
  • 36. relay log Storing GTIDs In a Table Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... B Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads gtid_executed gtid_executed
  • 37. Storing GTIDs In a Table Use Cases  Slaves can use GTIDs with binary logs disabled. — Slaves that are never candidates to become a master can still use GTIDs for auto positioning.  GTIDs are more resilient to unexpected deletion of binary logs. — If the DBA decides to delete all binlogs but the most recent one, GTID history is still preserved. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 38. Storing GTIDs In a Table Mechanics  GTIDs are saved into a mysql system table. CREATE TABLE gtid_executed( source_uuid CHAR(36) NOT NULL, interval_start BIGINT NOT NULL, interval_end BIGINT NOT NULL, PRIMARY KEY(source_uuid, interval_start) Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | );
  • 39. Storing GTIDs In a Table Mechanics  If binary log is enabled, gtids are first stored on the binary log and then copied to the table on binlog rotation or shutdown.  If binary log is disabled, gtids are stored in the table on commit. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 40. Preserve Commit Order (MTS) relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads
  • 41. Preserve Commit Order (MTS)  Multi-threaded Applier May be Instructed to Preserve Commit Order. — Applier Threads will commit in the same order transactions appear in the relay log. — Order is enforced at the expense of performance degradation. — This is controllable through the new global option/variable: --slave-preserve-commit-order. Default is FALSE. mysql> SET GLOBAL slave_preserve_commit_order= [TRUE|FALSE] Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 42. Redirect to new Master without interrupting the Applier relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads
  • 43. Redirect to new Master without interrupting the Applier Change master to B from A without stopping the applier threads. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | C B A C B CraAsh C B A B is the new master Uh Oh! Whew!
  • 44. Redirect to new Master without interrupting the Applier Change master to M2 from M1 without stopping the applier threads. Uh Oh! Whew! Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | C B A C B CraAsh C B A DBA did not need C to stop applying its relay log to change C's master from A to B.
  • 45. Redirect to new Master without interrupting the Applier  More “onlineness” during fail-over: mysql> STOP SLAVE IO_TRHEAD; mysql> CHANGE MASTER TO MASTER_HOST='master2', …; mysql> START SLAVE IO_THREAD;  Stopping, changing master and restarting the receiver thread is all done while the applier thread is running.  Change applier properties while the receiver thread is working: mysql> STOP SLAVE SQL_TRHEAD; mysql> CHANGE MASTER TO MASTER_DELAY=3600, …; mysql> START SLAVE SQL_THREAD; Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 46. Dynamic Slave Replication Filters relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads
  • 47. Dynamic Slave Replication Filters Change Slave's Replication Filters dynamically. — No need to stop and restart slave for establishing new replication filtering rules. — All slave filters are supported. mysql> CHANGE REPLICATION FILTER REPLICATE_DO_DB= (db1, db2) Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 48. Multi-Source Replication M M Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | S Slave can have more than one master. Feature preview based on 5.7 is available on labs.mysql.com . M M The need for gathering data in a central server:  Integrated backup;  Complex queries for analytics purposes;
  • 49. Multi-Source Replication  A server (slave) can replicate from multiple sources (masters).  Multiple channels (channel: connection thread, relay log, applier threads) that can be stopped started individually.  Integrated with Multi-threaded Slave: each channel has its own multi-threaded applier set of threads.  Integrated with the new P_S tables. — replication_execute_status_by_coordinator shows multiple entries, one per channel/source applier. — replication_connection_status shows multiple entries, one per connection to different sources. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 50. Multi-Source Replication  Integrated with GTIDs.  Integrated with crash-safe tables. — Progress state is stored in these tables for recoverability purposes.  Works with semisync replication. — Working on further improving the integration.  Virtually no limit on the number of sources (capped to 256, but can be changed if server binary is rebuilt).  Able to manage each source separately. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 51. Program Agenda Background Performance Usability Flexibility Consistency Extras Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 0 1 2 3 4 5
  • 52. Loss-less Semi-sync Replication relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads
  • 53. Loss-less Semi-sync Replication  Master waits for slave's ACK before committing (as opposed to: master waits for slave's ACK after committing). — Therefore, concurrent transactions do not externalize changes while waiting for ACK.  Should a master fail, then any transaction that it may have externalized is also persisted on a slave.  User can choose between the original semisync behavior and the new one. mysql> SET rpl_semi_sync_master_wait_point= [AFTER_SYNC|AFTER_COMMIT] Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 54. Loss-less Semi-sync Replication prepare commit Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Master Slave execute binlog relaylog T1: INSERT INTO t1 VALUES (1000) ACK Time T1 T2: SELECT * FROM t1; T2 empty set
  • 55. Semi-sync Replication – ACK Receiver Thread relay log Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Insert... Insert... B binary log Insert... Insert... A binary log Client Network Sender thread Receiver thread Applier Threads ACK Receiver thread
  • 56. Semi-sync Replication – ACK Receiver Thread  Consecutive transactions do not block each other while waiting for ACKs — Transaction t1 and t2 are sent immediately to the slave by the sender thread — ACKs are received only by a special thread — Transaction t2 does not include t1 round trip in its semisync overall latency  Thread starts when semisync is activated mysql> SET GLOBAL rpl_semi_master_enabled= ON  Thread stops when semisync is deactivated mysql> SET GLOBAL rpl_semi_master_enabled= ON Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 57. Semi-sync Replication in MySQL 5.7 “Semi-sync in MySQL 5.7 looks like a great improvement. [...] With MySQL 5.7, I’d be much more apt to recommend semi-sync as an option than in previous releases. Thanks to Oracle for investing here.” – Jay Janssen, MySQL Consulting Manager, Percona Inc http://www.percona.com/blog/2014/05/27/semi-sync-replication-performance-mysql-5-7-4-dmr/ Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 58. Introducing MySQL Group Replication  Multi-master update everywhere with conflict resolution.  Automatic distributed member recovery — When a server joins the group, it gets all the missing transactions before actually start serving requests. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 59. Group-Based Replication Plugin M M M M M MySQL Server API Replication Plugin Group Comm. System (Corosync) Group Comm. System (Corosync) Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 60. Group-Based Replication Plugin Update ... M M M M M Application issues an update. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 61. Group-Based Replication Plugin M M M M M Replication Events Application issues an update. Master executes and multi/broadcasts the update to the other servers. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 62. Group-Based Replication Plugin M M M M M Application issues an update. Master executes and multi/broadcasts the update to the other servers. Servers receive same transaction in the same order and check for conflicts. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 63. Group-Based Replication Plugin M M M M M Application issues an update. Master executes and multi/broadcasts the update to the other servers. Servers receive same transaction in the same order and check for conflicts. All servers, independently, decide to commit the transaction – no conflicts. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 64. Group-Based Replication Plugin Application issues an update. Master executes and multi/broadcasts the update to the other servers. Servers receive same transaction in the same order and check for conflicts. All servers, independently, decide to commit the transaction – no conflicts. Originating master replies to the application. M M M M M Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 65. MySQL Group Replication: Use Cases ● Automatic group membership management and failure detection - No need for server fail-over ● No single point of failure - Automatic reconfiguration Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 66. Under the hood ● Each server can belong to a group. ● The Group is identified by a name which is the Group UUID string, so group behaves like a single server. ● The Group UUID is used to log transactions. ● Whenever a server joins or leaves, it will start a new stable period in time on which servers can agree on distributed decisions. A special message called View Message is sent to each group member notifying that. ● Server join/leave can be issue manually or by scripts by DBA. ● Server leave can be caused also by node failures. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 67. Under the hood  Current used group communication toolkit is Corosync. It provides: — Virtual synchrony guarantees for creating replicated state machines.  Replicated state machine simple definition: — If a set of processes with the same initial state receives the same set of deterministic messages at the same order, them will reach the same state.  All write operations are sent to all group members for certification.  Read operations are only local. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 68. COMMIT dbv: 2 OK OK OK Certification - Positive Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | s1 s2 dbv: 1 UPDATE dbv: 2 s3 dbv: 2 COMMIT COMMIT cv: 1 1 >= 1 1 >= 1 1 >= 1 cv: 1 cv: 1 dbv: 1 dbv: 1 cv: 2 cv: 2 cv: 2 s ← server v ← snapshot version sn ← certifier sequence number (write set version)
  • 69. T1: COMMIT dbv: 2 Certification - Negative OK OK T2: UPDATE cv: 2 OK KO KO KO Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | s1 s2 dbv: 1 T1: UPDATE dbv: 2 s3 dbv: 2 T1: COMMIT T1: COMMIT cv: 1 cv: 1 cv: 1 1 >= 1 1 >= 1 1 >= 1 cv: 2 cv: 2 1 >= 2 1 >= 2 1 >= 2 dbv: 1 dbv: 1 s ← server v ← snapshot version sn ← certifier sequence number (write set version)
  • 70. Automated distributed member recovery Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | R1 R2 R3 R4 GCS R1 R2 R3 R4 R4 joins the group. GCS
  • 71. Automated distributed member recovery Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | R1 R2 R3 R4 R1 is R4 Donor GCS R1 R2 R3 R4 GCS
  • 72. Automated distributed member recovery Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | R1 R2 R3 R4 GCS R1 R2 R3 R4 GCS
  • 73. Automated distributed member recovery Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | R1 R2 R3 R4 GCS R1 R2 R3 R4 R4 has caught up with the view! GCS
  • 74. Automated distributed member recovery R1 R2 R3 R4 GCS Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | R1 R2 R3 R4 GCS Execute buffered transactions from the view.
  • 75. PERFORMANCE SCHEMA TABLE – REPLICATION_NODE_STATUS ● Statistics regarding Applier and Certifier module. – REPLICATION_CONNECTION_NODES ● Information regarding different nodes in the group and its connection details – REPLICATION_CONNECTION_STATUS ● Extended table to give details about the group connection status. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 76. Replication Monitoring: replication_node_status node1> SELECT * FROM performance_schema.replication_node_statusG *************************** 1. row *************************** GROUP_NAME: 8a84f397-aaa4-18df-89ab-c70aa9823561 NODE_ID: 2af09cb1-3e46-11e4-9e45-ecf4bb227f3b TRANSACTIONS_IN_QUEUE: 0 CERTIFIED_TRANSACTIONS: 12 POSITIVELY_CERTIFIED: 7 NEGATIVELY_CERTIFIED: 5 CERTIFICATION_DB_SIZE: 6 STABLE_SET: 8a84f397-aaa4-18df-89ab-c70aa9823561:1-7 LAST_CERTIFIED_TRANSACTION: 8a84f397-aaa4-18df-89ab-c70aa9823561:7 APPLIER_MODULE_STATUS: ON Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 77. Replication Monitoring: replication_node_status node1> SELECT * FROM performance_schema.replication_connection_nodesG *************************** 1. row *************************** GROUP_NAME 8a94f357-aab4-11df-86ab-c80aa9429573 NODE_ID 597dbb72-3e2c-11e4-9d9d-ecf4bb227f3b NODE_HOST nightfury NODE_PORT 13000 NODE_STATE ONLINE *************************** 2. row *************************** GROUP_NAME 8a94f357-aab4-11df-86ab-c80aa9429573 NODE_ID 59efb8a1-3e2c-11e4-9d9d-ecf4bb227f3b NODE_HOST nightfury NODE_PORT 13001 NODE_STATE ONLINE *************************** 3. row *************************** GROUP_NAME 8a94f357-aab4-11df-86ab-c80aa9429573 NODE_ID 5a706f6b-3e2c-11e4-9d9d-ecf4bb227f3b NODE_HOST nightfury NODE_PORT 13002 NODE_STATE RECOVERING Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 78. Replication Monitoring: replication_node_status node1> SELECT * FROM performance_schema.replication_connection_statusG *************************** 1. row *************************** GROUP_NAME: 8a94f357-aab4-11df-86ab-c80aa9429563 SOURCE_UUID: 8a94f357-aab4-11df-86ab-c80aa9429563 THREAD_ID: NULL SERVICE_STATE: ON COUNT_RECEIVED_HEARTBEATS: 0 LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00 RECEIVED_TRANSACTION_SET: LAST_ERROR_NUMBER: 0 LAST_ERROR_MESSAGE: LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00 TOTAL_MESSAGES_RECEIVED: 9 TOTAL_MESSAGES_SENT: 5 TOTAL_BYTES_RECEIVED: 1891 TOTAL_BYTES_SENT: 1065 LAST_MESSAGE_TIMESTAMP: 2014-09-23 09:20:26 MAX_MESSAGE_LENGTH: 358 MIN_MESSAGE_LENGTH: 51 VIEW_ID: 2 NUMBER_OF_NODES: 2 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 79.  Only transactional engines are supported (currently only InnoDB).  All tables must have primary key  GTID must be enabled.  Only deterministic DDL is allowed.  Optimistic execution: transactions may abort on COMMIT. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Limitations
  • 80. Program Agenda Background Performance Usability Flexibility Consistency Extras Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 0 1 2 3 4 5
  • 81. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | References  Read a feature preview of MySQL Group replication on Luis' blog: http://mysqlhighavailability.com/mysql-group-replication-hello-world/  Read about how to get started with MySQL Group replication on Pedro's blog: http://mysqlhighavailability.com/getting-started-with-mysql-group-replication/  Read about Transaction life cycle in MySQL Group replication on Nuno's blog: http://mysqlhighavailability.com/mysql-group-replication-transaction-life-cycle-explained/  Read about Distributed recovery in MySQL Group Replication on Pedro's blog: http://mysqlhighavailability.com/distributed-recovery-behind-the-scenes/  Read about Monitoring for MySQL Group Replication on Manish's blog: http://mysqlhighavailability.com/mysql-group-replication-monitoring/  Read about Corosync and Group Communication details on Tiago's blog: http://mysqlhighavailability.com/group-communication-behind-the-scenes/ http://mysqlhighavailability.com/mysql-group-replication-a-small-corosync-guide/  Read about Testing of MySQL Group Replication on Manish's blog: http://mysqlhighavailability.com/mysql-group-replication-testing/
  • 82. References: Read about the 5.7 DMRs Replication Features  Read more about P_S tables for replication on Shiv's blog: http://shivjijha.blogspot.com/2013/09/Monitoring-Replication-with-the-NEW-performance-schema-tables.html  Read more about Intra-Schema Multi-threaded Slave on Rohit's blog: http://geek.rohitkalhans.com/2013/09/enhancedMTS-deepdive.html ◾ Read more about Semisync enhancements on Libing's blog: http://my-replication-life.blogspot.com/2013/09/dump-thread-enhancement.html http://my-replication-life.blogspot.pt/2013/09/loss-less-semi-synchronous-replication.html Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 83. References: Read about the 5.7 DMRs Replication Features ◾ Read more about mysqlbinlog idempotent mode on Rohit's blog: http://binlogtorelaylog.blogspot.com/2013/05/mysqlbinlog-idemmpotent-mode.html ◾ Read more about mysqlbinlog –rewrite-db option on Manish's blog: http://manishthe.blogspot.com/2013/05/introduction-with-wonderful-and-best.html Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 84. References: Read about the 5.7 DMRs Replication Features  Read more on Dynamic Replication Filters on Venkat's blog: http://my-s-q-l.blogspot.com/2013/12/Making-MySQL-Slave-Replication-Filters-Dynamic.html  Read more on Semi-sync Multiple ACKs on Libing's blog: http://my-replication-life.blogspot.com/2013/12/enforced-semi-synchronous-replication.html  Read more on SSL options for mysqlbinlog on João's blog: http://jmysqlrep.blogspot.com/2013/12/mysql-57-mysqlbinlog-now-supports-ssl.html  Read more on Semisync ACK thread receiver on Libing's blog: http://my-replication-life.blogspot.com/2014/03/faster-semisync-replication.html Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 85. References: Read about the 5.7 DMRs Replication Features  Read more on Flexible Change Master on Shiv's blog: http://work.shivjijha.com/2014/04/change-master-without-stopping-slave.html Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 86. References: Read about the 5.7 DMRs Replication Features  Read more about Multi-source replication on Rith's blog: http://on-mysql-replication.blogspot.com/2013/09/feature-preview-mysql-multi-source-replication.html  Read a lot more on : mysqlhighavailability.com Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |