SlideShare a Scribd company logo
1 of 82
Download to read offline
The Eighth Generation of MySQL Replication
Sven Sandberg
(sven.sandberg@oracle.com)
MySQL Replication Core Team Lead
replic8
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |2
Safe Harbour 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 © 2017, Oracle and/or its affiliates. All rights reserved. |3
there’s no deb8:
it’s never too l8
to replic8
with version 8
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |4
Overview
Background: (Group) Replication
8.0: Performance
8.0: Monitoring
8.0: Operations
More!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |5
MySQL Group Replication
Traditional database
●
Many clients
●
One server
server
clients
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |6
MySQL Group Replication
server
A
server
B
server
C
clients
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |7
MySQL Group Replication
server
A
server
B
W WW
server
C
R RR R RR
clients
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |8
MySQL Group Replication
server
A
server
B
W RW
server
C
R W RW
clients
WR
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Limitations apply!
https://dev.mysql.com/doc/refman/8.0/en/group-replication-limitations.html
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |9
MySQL Group Replication
server
A
server
B
W RW
server
C
R W RW
clients
server
D
WR
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |10
MySQL Group Replication
server
A
server
B
W RW
server
C
WR R W RW
clients
server
D
server
E
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |11
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
server
D
server
E
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |12
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
server
D
server
E
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |13
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
server
E
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |14
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
server
E
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |15
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |16
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
We are 3:
A, B, C!
We are 3:
A, B, C!
We are 3:
A, B, C!
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |17
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |18
MySQL Group Replication
server
A
server
B
W RW R WR W RW
clients
You and me:
A and B!
You and me:
A and B!
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |19
MySQL Group Replication
server
A
server
B
W RW R WR W RW
clients
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
B B
A A
All receive in
same order
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |20
MySQL Group Replication
server
A
server
B
W RW R WR W RW
clients
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Table
row 1
row 2
row 3
Queue
insert row 4
Table
row 1
row 2
Queue
insert row 3
insert row 4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |21
MySQL Group Replication
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Summary:
GR in 8 is gr8
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |22
MySQL Async Replication
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |23
MySQL Async Replication
Example: Async replication between geo-distributed groups
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |24
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |25
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |26
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |27
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |28
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |29
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |30
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |31
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |32
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |33
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |34
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |35
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |36
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |37
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |38
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |39
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |40
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |41
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |42
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |43
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |44
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |45
Overview
Background: (Group) Replication
8.0: Performance
8.0: Monitoring
8.0: Operations
More!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |46
8.0 Performance: Writeset Parallelization
 Replica can apply more transactions in parallel
– Able to keep worker threads busy
– Can now use the full potential of the applier pipeline
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |47
8.0 Performance: Writeset Parallelization
 5.6: parallelize transactions that modify different databases
parallel isolated isolated isolated
 5.7: parallelize transactions that committed together
parallel parallel
 8.0: parallelize transactions that modify disjoint sets of rows
always >= 3 transactions applying in parallel in this example
db1 db2 db3 db3 db3 db3
row 1 row 2,3 row 4 row 1,5 row 6 row 4
Typical parallelism:
close to primary
Typical parallelism:
less than primary
Typical parallelism:
more than primary
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |48
8.0 Performance: Writeset Parallelization
 To enable:
primary> SET binlog_transaction_dependency_tracking = WRITESET;
replica> SET slave_parallel_workers = 4,
slave_parallel_type = LOGICAL_CLOCK,
slave_preserve_commit_order = 1;
 Note: slave_preserve_commit_order = 1:
– Apply in parallel, commit in order
– Preserves application constraints between transactions:
server
A
Constraint: “trx1 must commit before trx2”w
trx1, trx2
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |49
8.0 Performance: Applier Pipeline
 Parallelize reads and writes to relay log
 Performance for free
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
trx1
trx1
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |50
8.0 Performance: Efficient JSON Replication
 Document store / NOSQL is now efficient!
 UPDATE t SET j = JSON_REPLACE(j, “$[0].x.y[8]”, 7);
 Replicate only the modified part
 Huge saving for small changes in big documents
JSON document
modified part
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |51
8.0 Performance: Efficient JSON Replication
 Enable:
SET GLOBAL binlog_row_image = MINIMAL,
binlog_row_value_options = PARTIAL_JSON;
 JSON_SET, JSON_REPLACE, JSON_REMOVE
– And also composition: JSON_SET(JSON_REMOVE(...))
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |52
Overview
Background: (Group) Replication
8.0: Performance
8.0: Monitoring
8.0: Operations
More!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |53
machine Cmachine C machine Dmachine D
8.0 Monitoring: Lag
 Difference in server states,
measured in microseconds between commits,
between:
– Replica and primary
– Hops in topology
– Stages of applier
machine Bmachine B
B C D
machine Amachine A
A
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |54
machine Cmachine C machine Dmachine D
8.0 Monitoring: Lag
 Difference in server states,
measured in microseconds between commits,
between:
– Replica and primary
– Hops in topology
– Stages of applier
machine Bmachine B
B C D
machine Amachine A
A
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |55
machine Cmachine C machine Dmachine D
8.0 Monitoring: Lag
 Difference in server states,
measured in microseconds between commits,
between:
– Replica and primary
– Hops in topology
– Stages of applier
machine Bmachine B
B C D
machine Amachine A
A
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |56
machine Cmachine C machine Dmachine D
8.0 Monitoring: Lag
 Difference in server states,
measured in microseconds between commits,
between:
– Replica and primary
– Hops in topology
– Stages of applier
machine Bmachine B
B C D
machine Amachine A
A
original
commit
timestamp
immediate
commit
timestamp
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |57
machine Cmachine C machine Dmachine D
8.0 Monitoring: Lag
 Difference in server states,
measured in microseconds between commits,
between:
– Replica and primary
– Hops in topology
– Stages of applier
machine Bmachine B
B C D
machine Amachine A
A
original
commit
timestamp
immediate
commit
timestamp
This transaction’s latency vs primary:
SELECT LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP -
LAST_APPLIED_TRANSACTION_ORIGINAL_COMMIT_TIMESTAMP
FROM performance_schema.
replication_applier_status_by_worker
WHERE LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP =
MAX(LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP)
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |58
machine Cmachine C machine Dmachine D
8.0 Monitoring: Lag
 Difference in server states,
measured in microseconds between commits,
between:
– Replica and primary
– Hops in topology
– Stages of applier
machine Bmachine B
B C D
machine Amachine A
A
original
commit
timestamp
immediate
commit
timestamp
This transaction’s latency vs last hop:
SELECT LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP -
LAST_APPLIED_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP
FROM performance_schema.
replication_applier_status_by_worker
WHERE LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP =
MAX(LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP)
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |59
machine Cmachine C machine Dmachine D
8.0 Monitoring: Lag
 Difference in server states,
measured in microseconds between commits,
between:
– Replica and primary
– Hops in topology
– Stages of applier
machine Bmachine B
B C D
machine Amachine A
A
original
commit
timestamp
immediate
commit
timestamp
These transactions’ latencies vs last hop:
SELECT APPLYING_TRANSACTION_START_APPLY_TIMESTAMP –
APPLYING_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP
FROM performance_schema.
replication_applier_status_by_worker
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |60
machine Cmachine C machine Dmachine D
8.0 Monitoring: Lag
 Difference in server states,
measured in microseconds between commits,
between:
– Replica and primary
– Hops in topology
– Stages of applier
machine Bmachine B
B C D
machine Amachine A
A
original
commit
timestamp
immediate
commit
timestamp
This transaction’s latency vs last hop:
SELECT LAST_PROCESSED_TRANSACTION_END_BUFFER_TIMESTAMP –
LAST_PROCESSED_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP
FROM performance_schema.
replication_applier_status_by_coordinator
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |61
machine Cmachine C machine Dmachine D
8.0 Monitoring: Lag
 Difference in server states,
measured in microseconds between commits,
between:
– Replica and primary
– Hops in topology
– Stages of applier
machine Bmachine B
B C D
machine Amachine A
A
original
commit
timestamp
immediate
commit
timestamp
This transaction’s latency vs last hop:
SELECT PROCESSING_TRANSACTION_END_BUFFER_TIMESTAMP –
PROCESSING_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP
FROM performance_schema.
replication_applier_status_by_coordinator
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |62
machine Cmachine C machine Dmachine D
8.0 Monitoring: Lag
 Difference in server states,
measured in microseconds between commits,
between:
– Replica and primary
– Hops in topology
– Stages of applier
machine Bmachine B
B C D
machine Amachine A
A
original
commit
timestamp
immediate
commit
timestamp
This transaction’s latency vs last hop:
SELECT LAST_QUEUED_TRANSACTION_END_QUEUE_TIMESTAMP –
LAST_QUEUED_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP
FROM performance_schema.
replication_connection_status
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |63
machine Cmachine C machine Dmachine D
8.0 Monitoring: Lag
 Difference in server states,
measured in microseconds between commits,
between:
– Replica and primary
– Hops in topology
– Stages of applier
machine Bmachine B
B C D
machine Amachine A
A
original
commit
timestamp
immediate
commit
timestamp
This transaction’s latency vs last hop:
SELECT QUEUEING_TRANSACTION_END_QUEUE_TIMESTAMP –
QUEUEING_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP
FROM performance_schema.
replication_connection_status
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |64
8.0 Monitoring: Group Members
 Who are in this group?
– server_uuid, host, port, MySQL version
 Who is the primary?
 Online status of each node
mysql> SELECT … FROM performance_schema.replication_group_members
MEMBER_ID MEMBER_HOST MEMBER_PORT MEMBER_STATE MEMBER_ROLE MEMBER_VERSION
<uuid-A> murkla 3306 ONLINE PRIMARY 5.7.20
<uuid-B> kremla 3306 ONLINE SECONDARY 5.7.21
<uuid-C> kantarell 3306 UNREACHABLE SECONDARY 8.0.3
New in 8.0
B
5.7.21
A
5.7.20
C
8.0.3
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |65
8.0 Monitoring: Group Member Statistics
 Statistics used to diagnose group members
– Conflict ratio of the group
– Conflict ratio of each member (multi-primary)
– Is any member falling behind on certification or applying?
 Table performance_schema.replication_group_member_stats:
counts of transactions, by member:
– Positively/negatively certified transactions of any origin
– Positively/negatively certified transactions from the node
– Transactions waiting to be certified
– Certified transactions waiting to be applied
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |66
Overview
Background: (Group) Replication
8.0: Performance
8.0: Monitoring
8.0: Operations
More!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |67
8.0 Operations: Multi-source Filters
Users Posts
Aggr-
egate
users bio groups posts com-
ments
users
No
filter
--replicate-ignore-
table=db.users
only users
users bio groups posts com-
ments
Different filters on
two channels
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |68
8.0 Operations: Set Next Primary
BA C
W WW
SET group_replication_member_weight = [0-100]
Dw=25 w=20
R RR R RR R RR
w=10w=15
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |69
W WW
8.0 Operations: Set Next Primary
BA Cw=15 Dw=10 w=25 w=20
R RR R RR R RR
SET group_replication_member_weight = [0-100]
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |70
8.0 Operations: Set Next Primary
B C Dw=10 w=25 w=20
? ? ?
W WW R RR R RR R RR
SET group_replication_member_weight = [0-100]
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |71
SET group_replication_member_weight = [0-100]
8.0 Operations: Set Next Primary
B C Dw=10 w=25 w=20
? ? ?
W WW R RR R RR R RR
25 is the biggest
→ C is new primary
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |72
8.0 Operations: Set Next Primary
B C Dw=10 w=25 w=20
W WW R RR R RR R RR
SET group_replication_member_weight = [0-100]
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |73
8.0 Operations: No Writes After Leaving Group
BA C D
W WW
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |74
8.0 Operations: No Writes After Leaving Group
BA C D
Locally on A:
STOP GROUP REPLICATION
W WW
1. Disallow new writes
2. Wait for ongoing writes
3. Leave group
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |75
8.0 Operations: No Writes After Leaving Group
BA C D
Locally on A:
STOP GROUP REPLICATION
W WW
1. Disallow new writes
2. Wait for ongoing writes
3. Leave group
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |76
W WW
8.0 Operations: No Writes After Leaving Group
BA C D
Locally on A:
STOP GROUP REPLICATION
1. Disallow new writes
2. Wait for ongoing writes
3. Leave group
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |77
Overview
Background: (Group) Replication
8.0: Performance
8.0: Monitoring
8.0: Operations
More!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |78
More!
Global performance: Flow control tuning (throttle writes to sustain replicas)
Usability: Better default configuration
Monitoring: Monitor replication even when disk full
Monitoring: Currently applying query, even for row-based replication
Recoverability: Recover DDL after crash
Interoperability: Metadata in binary log (full type information for DML)
Interoperability: Transaction byte-length in binary log
Operations: GTID support for restoring backup on non-empty server
Operations: Specify binary log file number after RESET MASTER
Operations: Specify how long binary log files are kept, with second precision
Operations: Group Replication support for SAVEPOINT
Debugging: Group Replication: message bus logging
Maintenance: Removed 4.x/5.0 compatibility code
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |79
Contributions!
 Thank you:
Davi * 2
Daniel
Daniël * 2
Laurynas * 5
Ovais
Tsubasa * 2
Yura
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |80
“I can’t w8 to replic8 with version 8”
 Evalu8
https://dev.mysql.com/downloads/mysql
 Educ8
http://dev.mysql.com/doc/refman/8.0/en/group-replication.html
http://dev.mysql.com/doc/refman/8.0/en/replication.html
 Contempl8
http://mysqlhighavailability.com
 Cooper8
https://bugs.mysql.com
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |81
Thank You!& cu l8r, m8s
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. |82

More Related Content

What's hot

Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationPercona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationKenny Gryp
 
Maria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityMaria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityOSSCube
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)Altinity Ltd
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11Kenny Gryp
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationFrederic Descamps
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterFrederic Descamps
 
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...Edureka!
 
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfJesmar Cannao'
 
HandsOn ProxySQL Tutorial - PLSC18
HandsOn ProxySQL Tutorial - PLSC18HandsOn ProxySQL Tutorial - PLSC18
HandsOn ProxySQL Tutorial - PLSC18Derek Downey
 
MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!Vitor Oliveira
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialJean-François Gagné
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability Mydbops
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Bo-Yi Wu
 
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesMySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesKenny Gryp
 
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
 
ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)Mydbops
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleMariaDB plc
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsDerek Downey
 
MySQL Shell for Database Engineers
MySQL Shell for Database EngineersMySQL Shell for Database Engineers
MySQL Shell for Database EngineersMydbops
 

What's hot (20)

Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationPercona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
 
Maria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityMaria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High Availability
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
 
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
 
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
 
HandsOn ProxySQL Tutorial - PLSC18
HandsOn ProxySQL Tutorial - PLSC18HandsOn ProxySQL Tutorial - PLSC18
HandsOn ProxySQL Tutorial - PLSC18
 
MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!
 
Query logging with proxysql
Query logging with proxysqlQuery logging with proxysql
Query logging with proxysql
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署
 
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesMySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
 
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?
 
ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL Secrets
 
MySQL Shell for Database Engineers
MySQL Shell for Database EngineersMySQL Shell for Database Engineers
MySQL Shell for Database Engineers
 

Similar to replic8 - Replication in MySQL 8

MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL InnoDB Cluster and Group Replication - OSI 2017 BangaloreMySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL InnoDB Cluster and Group Replication - OSI 2017 BangaloreSujatha Sivakumar
 
Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability MattersMatt Lord
 
Robust easy affordable disaster recovery for MySQL Data
Robust easy affordable disaster recovery for MySQL DataRobust easy affordable disaster recovery for MySQL Data
Robust easy affordable disaster recovery for MySQL DataOracleMySQL
 
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisMySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisOlivier DASINI
 
High Availability in MySQL 8 using InnoDB Cluster
High Availability in MySQL 8 using InnoDB ClusterHigh Availability in MySQL 8 using InnoDB Cluster
High Availability in MySQL 8 using InnoDB ClusterSven Sandberg
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMatt Lord
 
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
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to DeploymentAerospike, Inc.
 
Oracle Code Online: Building a Serverless State Service for the Cloud
Oracle Code Online: Building a Serverless State Service for the CloudOracle Code Online: Building a Serverless State Service for the Cloud
Oracle Code Online: Building a Serverless State Service for the CloudEd Burns
 
Webinar slides: How to automate and manage MongoDB & Percona Server for MongoDB
Webinar slides: How to automate and manage MongoDB & Percona Server for MongoDBWebinar slides: How to automate and manage MongoDB & Percona Server for MongoDB
Webinar slides: How to automate and manage MongoDB & Percona Server for MongoDBSeveralnines
 
Oh2 opportunity for_smart_db
Oh2 opportunity for_smart_dbOh2 opportunity for_smart_db
Oh2 opportunity for_smart_dbToon Koppelaars
 
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
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017Ivan Ma
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL Brasil
 
MySQL User Camp : MySQL-Router
MySQL User Camp : MySQL-RouterMySQL User Camp : MySQL-Router
MySQL User Camp : MySQL-RouterPrasad Vasudevan
 
20191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv120191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv1Ivan Ma
 
Develop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPIDevelop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPIDave Stokes
 

Similar to replic8 - Replication in MySQL 8 (20)

MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL InnoDB Cluster and Group Replication - OSI 2017 BangaloreMySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
 
Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability Matters
 
Robust easy affordable disaster recovery for MySQL Data
Robust easy affordable disaster recovery for MySQL DataRobust easy affordable disaster recovery for MySQL Data
Robust easy affordable disaster recovery for MySQL Data
 
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisMySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
 
High Availability in MySQL 8 using InnoDB Cluster
High Availability in MySQL 8 using InnoDB ClusterHigh Availability in MySQL 8 using InnoDB Cluster
High Availability in MySQL 8 using InnoDB Cluster
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 
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
 
SD Times - Docker v2
SD Times - Docker v2SD Times - Docker v2
SD Times - Docker v2
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to Deployment
 
Oracle Code Online: Building a Serverless State Service for the Cloud
Oracle Code Online: Building a Serverless State Service for the CloudOracle Code Online: Building a Serverless State Service for the Cloud
Oracle Code Online: Building a Serverless State Service for the Cloud
 
Webinar slides: How to automate and manage MongoDB & Percona Server for MongoDB
Webinar slides: How to automate and manage MongoDB & Percona Server for MongoDBWebinar slides: How to automate and manage MongoDB & Percona Server for MongoDB
Webinar slides: How to automate and manage MongoDB & Percona Server for MongoDB
 
Oh2 opportunity for_smart_db
Oh2 opportunity for_smart_dbOh2 opportunity for_smart_db
Oh2 opportunity for_smart_db
 
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)
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e Uber
 
My sql router
My sql routerMy sql router
My sql router
 
MySQL User Camp : MySQL-Router
MySQL User Camp : MySQL-RouterMySQL User Camp : MySQL-Router
MySQL User Camp : MySQL-Router
 
20191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv120191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv1
 
Develop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPIDevelop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPI
 
MySQL HA
MySQL HAMySQL HA
MySQL HA
 

Recently uploaded

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 

Recently uploaded (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 

replic8 - Replication in MySQL 8

  • 1. The Eighth Generation of MySQL Replication Sven Sandberg (sven.sandberg@oracle.com) MySQL Replication Core Team Lead replic8
  • 2. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |2 Safe Harbour 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.
  • 3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |3 there’s no deb8: it’s never too l8 to replic8 with version 8
  • 4. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |4 Overview Background: (Group) Replication 8.0: Performance 8.0: Monitoring 8.0: Operations More!
  • 5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |5 MySQL Group Replication Traditional database ● Many clients ● One server server clients
  • 6. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |6 MySQL Group Replication server A server B server C clients Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 7. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |7 MySQL Group Replication server A server B W WW server C R RR R RR clients Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 8. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |8 MySQL Group Replication server A server B W RW server C R W RW clients WR Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates Limitations apply! https://dev.mysql.com/doc/refman/8.0/en/group-replication-limitations.html
  • 9. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |9 MySQL Group Replication server A server B W RW server C R W RW clients server D WR Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 10. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |10 MySQL Group Replication server A server B W RW server C WR R W RW clients server D server E Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 11. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |11 MySQL Group Replication server A server B W RW server C R WR W RW clients server D server E Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 12. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |12 MySQL Group Replication server A server B W RW server C R WR W RW clients server D server E Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 13. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |13 MySQL Group Replication server A server B W RW server C R WR W RW clients server E Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 14. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |14 MySQL Group Replication server A server B W RW server C R WR W RW clients server E Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 15. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |15 MySQL Group Replication server A server B W RW server C R WR W RW clients Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 16. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |16 MySQL Group Replication server A server B W RW server C R WR W RW clients We are 3: A, B, C! We are 3: A, B, C! We are 3: A, B, C! Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |17 MySQL Group Replication server A server B W RW server C R WR W RW clients Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 18. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |18 MySQL Group Replication server A server B W RW R WR W RW clients You and me: A and B! You and me: A and B! Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |19 MySQL Group Replication server A server B W RW R WR W RW clients Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates B B A A All receive in same order
  • 20. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |20 MySQL Group Replication server A server B W RW R WR W RW clients Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates Table row 1 row 2 row 3 Queue insert row 4 Table row 1 row 2 Queue insert row 3 insert row 4
  • 21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |21 MySQL Group Replication Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates Summary: GR in 8 is gr8
  • 22. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |22 MySQL Async Replication
  • 23. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |23 MySQL Async Replication Example: Async replication between geo-distributed groups
  • 24. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |24 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 25. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |25 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 26. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |26 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 27. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |27 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 28. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |28 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 29. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |29 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 30. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |30 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 31. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |31 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 32. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |32 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 33. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |33 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 34. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |34 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 35. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |35 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 36. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |36 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 37. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |37 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 38. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |38 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 39. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |39 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 40. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |40 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 41. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |41 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 42. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |42 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 43. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |43 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 44. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |44 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 45. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |45 Overview Background: (Group) Replication 8.0: Performance 8.0: Monitoring 8.0: Operations More!
  • 46. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |46 8.0 Performance: Writeset Parallelization  Replica can apply more transactions in parallel – Able to keep worker threads busy – Can now use the full potential of the applier pipeline
  • 47. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |47 8.0 Performance: Writeset Parallelization  5.6: parallelize transactions that modify different databases parallel isolated isolated isolated  5.7: parallelize transactions that committed together parallel parallel  8.0: parallelize transactions that modify disjoint sets of rows always >= 3 transactions applying in parallel in this example db1 db2 db3 db3 db3 db3 row 1 row 2,3 row 4 row 1,5 row 6 row 4 Typical parallelism: close to primary Typical parallelism: less than primary Typical parallelism: more than primary
  • 48. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |48 8.0 Performance: Writeset Parallelization  To enable: primary> SET binlog_transaction_dependency_tracking = WRITESET; replica> SET slave_parallel_workers = 4, slave_parallel_type = LOGICAL_CLOCK, slave_preserve_commit_order = 1;  Note: slave_preserve_commit_order = 1: – Apply in parallel, commit in order – Preserves application constraints between transactions: server A Constraint: “trx1 must commit before trx2”w trx1, trx2
  • 49. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |49 8.0 Performance: Applier Pipeline  Parallelize reads and writes to relay log  Performance for free Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network trx1 trx1
  • 50. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |50 8.0 Performance: Efficient JSON Replication  Document store / NOSQL is now efficient!  UPDATE t SET j = JSON_REPLACE(j, “$[0].x.y[8]”, 7);  Replicate only the modified part  Huge saving for small changes in big documents JSON document modified part
  • 51. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |51 8.0 Performance: Efficient JSON Replication  Enable: SET GLOBAL binlog_row_image = MINIMAL, binlog_row_value_options = PARTIAL_JSON;  JSON_SET, JSON_REPLACE, JSON_REMOVE – And also composition: JSON_SET(JSON_REMOVE(...))
  • 52. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |52 Overview Background: (Group) Replication 8.0: Performance 8.0: Monitoring 8.0: Operations More!
  • 53. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |53 machine Cmachine C machine Dmachine D 8.0 Monitoring: Lag  Difference in server states, measured in microseconds between commits, between: – Replica and primary – Hops in topology – Stages of applier machine Bmachine B B C D machine Amachine A A
  • 54. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |54 machine Cmachine C machine Dmachine D 8.0 Monitoring: Lag  Difference in server states, measured in microseconds between commits, between: – Replica and primary – Hops in topology – Stages of applier machine Bmachine B B C D machine Amachine A A
  • 55. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |55 machine Cmachine C machine Dmachine D 8.0 Monitoring: Lag  Difference in server states, measured in microseconds between commits, between: – Replica and primary – Hops in topology – Stages of applier machine Bmachine B B C D machine Amachine A A
  • 56. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |56 machine Cmachine C machine Dmachine D 8.0 Monitoring: Lag  Difference in server states, measured in microseconds between commits, between: – Replica and primary – Hops in topology – Stages of applier machine Bmachine B B C D machine Amachine A A original commit timestamp immediate commit timestamp
  • 57. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |57 machine Cmachine C machine Dmachine D 8.0 Monitoring: Lag  Difference in server states, measured in microseconds between commits, between: – Replica and primary – Hops in topology – Stages of applier machine Bmachine B B C D machine Amachine A A original commit timestamp immediate commit timestamp This transaction’s latency vs primary: SELECT LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP - LAST_APPLIED_TRANSACTION_ORIGINAL_COMMIT_TIMESTAMP FROM performance_schema. replication_applier_status_by_worker WHERE LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP = MAX(LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP)
  • 58. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |58 machine Cmachine C machine Dmachine D 8.0 Monitoring: Lag  Difference in server states, measured in microseconds between commits, between: – Replica and primary – Hops in topology – Stages of applier machine Bmachine B B C D machine Amachine A A original commit timestamp immediate commit timestamp This transaction’s latency vs last hop: SELECT LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP - LAST_APPLIED_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP FROM performance_schema. replication_applier_status_by_worker WHERE LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP = MAX(LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP)
  • 59. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |59 machine Cmachine C machine Dmachine D 8.0 Monitoring: Lag  Difference in server states, measured in microseconds between commits, between: – Replica and primary – Hops in topology – Stages of applier machine Bmachine B B C D machine Amachine A A original commit timestamp immediate commit timestamp These transactions’ latencies vs last hop: SELECT APPLYING_TRANSACTION_START_APPLY_TIMESTAMP – APPLYING_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP FROM performance_schema. replication_applier_status_by_worker
  • 60. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |60 machine Cmachine C machine Dmachine D 8.0 Monitoring: Lag  Difference in server states, measured in microseconds between commits, between: – Replica and primary – Hops in topology – Stages of applier machine Bmachine B B C D machine Amachine A A original commit timestamp immediate commit timestamp This transaction’s latency vs last hop: SELECT LAST_PROCESSED_TRANSACTION_END_BUFFER_TIMESTAMP – LAST_PROCESSED_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP FROM performance_schema. replication_applier_status_by_coordinator
  • 61. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |61 machine Cmachine C machine Dmachine D 8.0 Monitoring: Lag  Difference in server states, measured in microseconds between commits, between: – Replica and primary – Hops in topology – Stages of applier machine Bmachine B B C D machine Amachine A A original commit timestamp immediate commit timestamp This transaction’s latency vs last hop: SELECT PROCESSING_TRANSACTION_END_BUFFER_TIMESTAMP – PROCESSING_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP FROM performance_schema. replication_applier_status_by_coordinator
  • 62. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |62 machine Cmachine C machine Dmachine D 8.0 Monitoring: Lag  Difference in server states, measured in microseconds between commits, between: – Replica and primary – Hops in topology – Stages of applier machine Bmachine B B C D machine Amachine A A original commit timestamp immediate commit timestamp This transaction’s latency vs last hop: SELECT LAST_QUEUED_TRANSACTION_END_QUEUE_TIMESTAMP – LAST_QUEUED_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP FROM performance_schema. replication_connection_status
  • 63. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |63 machine Cmachine C machine Dmachine D 8.0 Monitoring: Lag  Difference in server states, measured in microseconds between commits, between: – Replica and primary – Hops in topology – Stages of applier machine Bmachine B B C D machine Amachine A A original commit timestamp immediate commit timestamp This transaction’s latency vs last hop: SELECT QUEUEING_TRANSACTION_END_QUEUE_TIMESTAMP – QUEUEING_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP FROM performance_schema. replication_connection_status
  • 64. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |64 8.0 Monitoring: Group Members  Who are in this group? – server_uuid, host, port, MySQL version  Who is the primary?  Online status of each node mysql> SELECT … FROM performance_schema.replication_group_members MEMBER_ID MEMBER_HOST MEMBER_PORT MEMBER_STATE MEMBER_ROLE MEMBER_VERSION <uuid-A> murkla 3306 ONLINE PRIMARY 5.7.20 <uuid-B> kremla 3306 ONLINE SECONDARY 5.7.21 <uuid-C> kantarell 3306 UNREACHABLE SECONDARY 8.0.3 New in 8.0 B 5.7.21 A 5.7.20 C 8.0.3
  • 65. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |65 8.0 Monitoring: Group Member Statistics  Statistics used to diagnose group members – Conflict ratio of the group – Conflict ratio of each member (multi-primary) – Is any member falling behind on certification or applying?  Table performance_schema.replication_group_member_stats: counts of transactions, by member: – Positively/negatively certified transactions of any origin – Positively/negatively certified transactions from the node – Transactions waiting to be certified – Certified transactions waiting to be applied
  • 66. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |66 Overview Background: (Group) Replication 8.0: Performance 8.0: Monitoring 8.0: Operations More!
  • 67. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |67 8.0 Operations: Multi-source Filters Users Posts Aggr- egate users bio groups posts com- ments users No filter --replicate-ignore- table=db.users only users users bio groups posts com- ments Different filters on two channels
  • 68. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |68 8.0 Operations: Set Next Primary BA C W WW SET group_replication_member_weight = [0-100] Dw=25 w=20 R RR R RR R RR w=10w=15
  • 69. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |69 W WW 8.0 Operations: Set Next Primary BA Cw=15 Dw=10 w=25 w=20 R RR R RR R RR SET group_replication_member_weight = [0-100]
  • 70. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |70 8.0 Operations: Set Next Primary B C Dw=10 w=25 w=20 ? ? ? W WW R RR R RR R RR SET group_replication_member_weight = [0-100]
  • 71. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |71 SET group_replication_member_weight = [0-100] 8.0 Operations: Set Next Primary B C Dw=10 w=25 w=20 ? ? ? W WW R RR R RR R RR 25 is the biggest → C is new primary
  • 72. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |72 8.0 Operations: Set Next Primary B C Dw=10 w=25 w=20 W WW R RR R RR R RR SET group_replication_member_weight = [0-100]
  • 73. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |73 8.0 Operations: No Writes After Leaving Group BA C D W WW
  • 74. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |74 8.0 Operations: No Writes After Leaving Group BA C D Locally on A: STOP GROUP REPLICATION W WW 1. Disallow new writes 2. Wait for ongoing writes 3. Leave group
  • 75. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |75 8.0 Operations: No Writes After Leaving Group BA C D Locally on A: STOP GROUP REPLICATION W WW 1. Disallow new writes 2. Wait for ongoing writes 3. Leave group
  • 76. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |76 W WW 8.0 Operations: No Writes After Leaving Group BA C D Locally on A: STOP GROUP REPLICATION 1. Disallow new writes 2. Wait for ongoing writes 3. Leave group
  • 77. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |77 Overview Background: (Group) Replication 8.0: Performance 8.0: Monitoring 8.0: Operations More!
  • 78. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |78 More! Global performance: Flow control tuning (throttle writes to sustain replicas) Usability: Better default configuration Monitoring: Monitor replication even when disk full Monitoring: Currently applying query, even for row-based replication Recoverability: Recover DDL after crash Interoperability: Metadata in binary log (full type information for DML) Interoperability: Transaction byte-length in binary log Operations: GTID support for restoring backup on non-empty server Operations: Specify binary log file number after RESET MASTER Operations: Specify how long binary log files are kept, with second precision Operations: Group Replication support for SAVEPOINT Debugging: Group Replication: message bus logging Maintenance: Removed 4.x/5.0 compatibility code
  • 79. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |79 Contributions!  Thank you: Davi * 2 Daniel Daniël * 2 Laurynas * 5 Ovais Tsubasa * 2 Yura
  • 80. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |80 “I can’t w8 to replic8 with version 8”  Evalu8 https://dev.mysql.com/downloads/mysql  Educ8 http://dev.mysql.com/doc/refman/8.0/en/group-replication.html http://dev.mysql.com/doc/refman/8.0/en/replication.html  Contempl8 http://mysqlhighavailability.com  Cooper8 https://bugs.mysql.com
  • 81. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |81 Thank You!& cu l8r, m8s
  • 82. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. |82