SlideShare a Scribd company logo
1 of 191
Download to read offline
1 / 191
2 / 1912 / 191
 
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for information purpose 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 up in
making purchasing decisions. The development, release and timing of any features or functionality described for Oracle´s product
remains at the sole discretion of Oracle.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
3 / 191
about.me/lefred
Who am I ?
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
4 / 191
Frédéric Descamps
@lefred
MySQL Evangelist
Managing MySQL since 3.23
devops believer
living in Belgium 🇧🇪
https://lefred.be
 
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
5 / 191
Group Replication: heart of MySQL InnoDB Cluster
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
6 / 191
Group Replication: heart of MySQL InnoDB Cluster
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
7 / 191
MySQL Group Replication
but what is it ?!?
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
8 / 191
GR is a plugin for MySQL, made by MySQL and packaged with
MySQL
GR is an implementation of Replicated Database State
Machine theory
Paxos based protocol
GR allows to write on all Group Members (cluster nodes)
simultaneously while retaining consistency
GR implements conflict detection and resolution
GR allows automatic distributed recovery
Automatic failover
Automatic membership configuration
Adding/removing members
Network partitions, failures
Prevents data loss
Supported on all MySQL platforms !!
Linux, Windows, Solaris, OSX, FreeBSD
Completely Open Source - GPL ! No license required to have
High Availability
MySQL Group Replication
but what is it ?!?
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
9 / 191
Group Replication is nice, but how does it work ?
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
10 / 191
Group Replication is nice, but how does it work ?
it´s just ...
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
11 / 191
Group Replication is nice, but how does it work ?
it´s just ...
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
12 / 191
Group Replication is nice, but how does it work ?
it´s just ...
... no, in fact the writesets replication is synchronous and then certification and apply of the changes are local to each nodes and
asynchronous.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
13 / 191
Group Replication is nice, but how does it work ?
it´s just ...
... no, in fact the writesets replication is synchronous and then certification and apply of the changes are local to each nodes and
asynchronous.
not that easy to understand... right ? As a picture is worth a 1000 words, let´s illustrate this...
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
14 / 191
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
15 / 191
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
16 / 191
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
17 / 191
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
18 / 191
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
19 / 191
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
20 / 191
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
21 / 191
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
22 / 191
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
23 / 191
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
24 / 191
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
25 / 191
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
26 / 191
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
27 / 191
MySQL Group Replication (full transaction)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
28 / 191
MySQL Group Replication (full transaction)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
29 / 191
MySQL Group Replication (full transaction)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
30 / 191
MySQL Group Replication (full transaction)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
31 / 191
MySQL Group Replication (full transaction)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
32 / 191
MySQL Group Replication (full transaction)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
33 / 191
MySQL Group Replication (full transaction)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
34 / 191
MySQL Group Replication (full transaction)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
35 / 191
MySQL Group Replication (full transaction)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
36 / 191
MySQL Group Communication System (GCS)
MySQL Xcom protocol
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
37 / 191
MySQL Group Communication System (GCS)
MySQL Xcom protocol
Replicated Database State Machine
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
38 / 191
MySQL Group Communication System (GCS)
MySQL Xcom protocol
Replicated Database State Machine
Paxos based protocol (a variant of Mencius)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
39 / 191
MySQL Group Communication System (GCS)
MySQL Xcom protocol
Replicated Database State Machine
Paxos based protocol (a variant of Mencius)
its task: deliver messages across the distributed system:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
40 / 191
MySQL Group Communication System (GCS)
MySQL Xcom protocol
Replicated Database State Machine
Paxos based protocol (a variant of Mencius)
its task: deliver messages across the distributed system:
atomically
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
41 / 191
MySQL Group Communication System (GCS)
MySQL Xcom protocol
Replicated Database State Machine
Paxos based protocol (a variant of Mencius)
its task: deliver messages across the distributed system:
atomically
in Total Order (Writes)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
42 / 191
MySQL Group Communication System (GCS)
MySQL Xcom protocol
Replicated Database State Machine
Paxos based protocol (a variant of Mencius)
its task: deliver messages across the distributed system:
atomically
in Total Order (Writes)
MySQL Group Replication receives the Ordered 'tickets' from this GCS subsystem.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
43 / 191
Architecture, Stack, Core, ...
MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
44 / 191
MySQL Group Replication - Architecture
Node Types:
R: Traffic routers/proxies: MySQL Router, HAProxy, ProxySQL...
M: mysqld nodes participating in MySQL Group Replication
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
45 / 191
MySQL Group Replication - Stack
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
46 / 191
Server calls into the plugin through a generic interface
Most server internals are hidden from the plugin
Plugin interacts with the server through a generic interface
Replication plugin determines the fate of the commit
operation through a well defined server interface
The plugin makes use of the relay log infrastructure to
inject changes in the receiving server
MySQL Group Replication - Core
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
47 / 191
Maintaining distributed execution context
Detecting and Resolving conflicts
Handling distributed recovery
Detect membership changes
Donate state if needed
Collect state if needed
Proposing transactions to other members
Receiving and handling transactions from other members
Deciding the ultimate fate of transactions
commit or rollback
MySQL Group Replication - GR Plugin
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
48 / 191
The communication API (and binding) is responsible for:
Abstracting the underlying group communication system implementation from
the plugin itself
Mapping the interface to a specific group communication system implementation
The Group Communication System engine:
Paxos implementation
(Similar to Paxos Mencius)
Building block to provide distributed agreement between servers
MySQL Group Replication - GCS
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
49 / 191
Total Order
GTID generation
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
50 / 191
MySQL Group Replication uses MySQL replication framework by
design:
binary logs
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
51 / 191
MySQL Group Replication uses MySQL replication framework by
design:
binary logs
relay logs
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
52 / 191
MySQL Group Replication uses MySQL replication framework by
design:
binary logs
relay logs
GTIDs: Global Transaction IDs
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
53 / 191
How does Group Replication handle GTIDs ?
There are two ways of generating GTIDs:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
54 / 191
How does Group Replication handle GTIDs ?
There are two ways of generating GTIDs:
AUTOMATIC: the transaction is assigned with an automatically generated id during commit. Where regular replication uses the
source server UUID, on Group Replication, the group name is used.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
55 / 191
How does Group Replication handle GTIDs ?
There are two ways of generating GTIDs:
AUTOMATIC: the transaction is assigned with an automatically generated id during commit. Where regular replication uses the
source server UUID, on Group Replication, the group name is used.
ASSIGNED: the user assigns manually a GTID through SET GTID_NEXT to the transaction. This is common to any replication
format and the id is assigned before the transaction starts.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
56 / 191
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
57 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
58 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
59 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
60 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
61 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
62 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
63 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
64 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
65 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
66 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
67 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
68 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
69 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
70 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
71 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
72 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
73 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
74 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
75 / 191
Group Replication : Total Order Delivery - GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
76 / 191
Group Replication : GTID
The previous example was not totally in sync with reality. In fact, a writer allocates a block of GTID and when we have multiple
writes (multi-primary mode) all writers will use GTID sequence numbers in their allocated block.
The size of the block is defined by group_replication_gtid_assignment_block_size (default to 1M)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
77 / 191
Group Replication : GTID
Example:
Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
78 / 191
Group Replication : GTID
Example:
Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355
New write on an other node:
Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355,1000354
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
79 / 191
Group Replication : GTID
Example:
Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355
New write on an other node:
Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355,1000354
Let's write on the third node:
Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355:1000354:2000354
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
80 / 191
Group Replication : GTID
Example:
Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355
New write on an other node:
Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355,1000354
Let's write on the third node:
Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355:1000354:2000354
And writing back on the first one:
Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-356:1000354:2000354
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
81 / 191
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
82 / 191
done !
Return from Commit
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
83 / 191
Group Replication: return from commit
Asynchronous Replication:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
84 / 191
Group Replication: return from commit (2)
Semi-Sync Replication:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
85 / 191
(*): eventual
Group Replication: return from commit (3)
Group Replication (*):
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
86 / 191
(*): before
Group Replication: return from commit (4)
Group Replication (*):
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
87 / 191
(*): after
Group Replication: return from commit (5)
Group Replication (*):
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
88 / 191
Does this mean we can have a distant node and always let it ack later
?
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
89 / 191
Does this mean we can have a distant node and always let it ack later
?
NO!
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
90 / 191
Does this mean we can have a distant node and always let it ack later
?
NO!
Because the system has to wait for the noop (single skip message) from the “distant” node where latency is higher
The size of the GCS consensus messages window can be get and set from UDF functions:
group_replication_get_write_concurrency(), group_replication_set_write_concurrency()
mysql> select group_replication_get_write_concurrency();
+-------------------------------------------+
| group_replication_get_write_concurrency() |
+-------------------------------------------+
| 10 |
+-------------------------------------------+
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
91 / 191
Event Horizon
GCS Write Consensus Concurrency
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
92 / 191
Event Horizon
GCS Write Consensus Concurrency
group replication write concurrency
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
93 / 191
Event Horizon
GCS Write Consensus Concurrency
group replication write concurrency
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
94 / 191
Event Horizon
GCS Write Consensus Concurrency
group replication write concurrency
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
95 / 191
Event Horizon
GCS Write Consensus Concurrency
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
96 / 191
Event Horizon
GCS Write Consensus Concurrency
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
97 / 191
Event Horizon
GCS Write Consensus Concurrency
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
98 / 191
Event Horizon
GCS Write Consensus Concurrency
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
99 / 191
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
100 / 191
conflict
Optimistic Locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
101 / 191
Group Replication : Optimistic Locking
Group Replication uses optimistic locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
102 / 191
Group Replication : Optimistic Locking
Group Replication uses optimistic locking
during a transaction, local (InnoDB) locking happens
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
103 / 191
Group Replication : Optimistic Locking
Group Replication uses optimistic locking
during a transaction, local (InnoDB) locking happens
optimistically assumes there will be no conflicts across nodes
(no communication between nodes necessary)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
104 / 191
Group Replication : Optimistic Locking
Group Replication uses optimistic locking
during a transaction, local (InnoDB) locking happens
optimistically assumes there will be no conflicts across nodes
(no communication between nodes necessary)
cluster-wide conflict resolution happens only at COMMIT, during certification
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
105 / 191
Group Replication : Optimistic Locking
Group Replication uses optimistic locking
during a transaction, local (InnoDB) locking happens
optimistically assumes there will be no conflicts across nodes
(no communication between nodes necessary)
cluster-wide conflict resolution happens only at COMMIT, during certification
Let´s first have a look at the traditional locking to compare.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
106 / 191
Traditional locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
107 / 191
Traditional locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
108 / 191
Traditional locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
109 / 191
Traditional locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
110 / 191
Traditional locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
111 / 191
Traditional locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
112 / 191
Optimistic Locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
113 / 191
Optimistic Locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
114 / 191
Optimistic Locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
115 / 191
Optimistic Locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
116 / 191
Optimistic Locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
117 / 191
Optimistic Locking
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
118 / 191
Optimistic Locking
The system returns error 149 as certification failed:
ERROR 1180 (HY000): Got error 149 during COMMIT
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
119 / 191
Optimistic Locking (2)
The conflict detection can happen at two different stage:
Only one of the two transactions was sent to the Group and the other one is still running (local).
If both transaction were sent to the Group at almost the same time and both reached GCS/XCOM.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
120 / 191
Optimistic Locking (3)
Only one transaction was sent to GCS and the other conflicting one is still local:
In this case, it's the high priority transaction mechanism of InnoDB that kills the local one:
If you try any statement in the transaction's session you will see:
ERROR: 1213: Deadlock found when trying to get lock; try restarting transaction
If you try to commit the transaction you will see:
ERROR: 1180: Got error 149 - 'Lock deadlock; Retry transaction' during COMMIT
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
121 / 191
Optimistic Locking (4)
Both transactions were sent to GCS:
The second transaction (the conflicting one) will return:
ERROR 3101 (40000): Plugin instructed the server to rollback the current transaction.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
122 / 191
Such conflicts happen only when using multi-primary group !
 
not totally true in MySQL < 8.0.13 when failover happens
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
123 / 191
Drawbacks of optimistic locking
having a first-committer-wins system means conflicts will more likely happen when writing on multiple members with:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
124 / 191
Drawbacks of optimistic locking
having a first-committer-wins system means conflicts will more likely happen when writing on multiple members with:
large transactions
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
125 / 191
Drawbacks of optimistic locking
having a first-committer-wins system means conflicts will more likely happen when writing on multiple members with:
large transactions
long running transactions
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
126 / 191
Drawbacks of optimistic locking
having a first-committer-wins system means conflicts will more likely happen when writing on multiple members with:
large transactions
long running transactions
hotspot records
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
127 / 191
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
128 / 191
Configurable Consistency Guarantees
Consistency Levels
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
129 / 191
mysql> show variables like
'group_replication_consistency';
+-------------------------------+----------+
| Variable_name | Value |
+-------------------------------+----------+
| group_replication_consistency | EVENTUAL |
+-------------------------------+----------+
 
 
Consistency: EVENTUAL (default)
By default, there is no synchronization point for the transactions, when you perform a write on a node, if you immediately read the
same data on another node, it is eventually there.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
130 / 191
mysql> show variables like
'group_replication_consistency';
+-------------------------------+----------+
| Variable_name | Value |
+-------------------------------+----------+
| group_replication_consistency | EVENTUAL |
+-------------------------------+----------+
 
 
Consistency: EVENTUAL (default)
By default, there is no synchronization point for the transactions, when you perform a write on a node, if you immediately read the
same data on another node, it is eventually there.
Since MySQL 8.0.16, we have to possibility to set the
synchronization point at read or at write or both (globally or for a
session).
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
131 / 191
Consistency: BEFORE (READ)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
132 / 191
Consistency: AFTER (WRITE)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
133 / 191
Consistency: BEFORE_AND_AFTER
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
134 / 191
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
135 / 191
can the transaction be committed ?
Certification
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
136 / 191
Certification
Certification is the process that only needs to answer the following unique question:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
137 / 191
Certification
Certification is the process that only needs to answer the following unique question:
can the write (transaction) be committed ?
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
138 / 191
Certification
Certification is the process that only needs to answer the following unique question:
can the write (transaction) be committed ?
based on yet to be applied transactions
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
139 / 191
Certification
Certification is the process that only needs to answer the following unique question:
can the write (transaction) be committed ?
based on yet to be applied transactions
such conflicts must come for other members/nodes
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
140 / 191
Certification
Certification is the process that only needs to answer the following unique question:
can the write (transaction) be committed ?
based on yet to be applied transactions
such conflicts must come for other members/nodes
happens on every member/node and is deterministic
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
141 / 191
Certification
Certification is the process that only needs to answer the following unique question:
can the write (transaction) be committed ?
based on yet to be applied transactions
such conflicts must come for other members/nodes
happens on every member/node and is deterministic
results are not reported to the group (does not require a new communication step)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
142 / 191
Certification
Certification is the process that only needs to answer the following unique question:
can the write (transaction) be committed ?
based on yet to be applied transactions
such conflicts must come for other members/nodes
happens on every member/node and is deterministic
results are not reported to the group (does not require a new communication step)
pass: commit/queue to appy
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
143 / 191
Certification
Certification is the process that only needs to answer the following unique question:
can the write (transaction) be committed ?
based on yet to be applied transactions
such conflicts must come for other members/nodes
happens on every member/node and is deterministic
results are not reported to the group (does not require a new communication step)
pass: commit/queue to appy
fail: rollback/drop the transaction
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
144 / 191
Certification
Certification is the process that only needs to answer the following unique question:
can the write (transaction) be committed ?
based on yet to be applied transactions
such conflicts must come for other members/nodes
happens on every member/node and is deterministic
results are not reported to the group (does not require a new communication step)
pass: commit/queue to appy
fail: rollback/drop the transaction
serialized by the total order in GCS/XCOM + GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
145 / 191
Certification
Certification is the process that only needs to answer the following unique question:
can the write (transaction) be committed ?
based on yet to be applied transactions
such conflicts must come for other members/nodes
happens on every member/node and is deterministic
results are not reported to the group (does not require a new communication step)
pass: commit/queue to appy
fail: rollback/drop the transaction
serialized by the total order in GCS/XCOM + GTID
cost is based on trx size (# rows & # keys)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
146 / 191
terminology
Write vs Writeset
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
147 / 191
Let's illustrate a table:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
148 / 191
Now let's make a change
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
149 / 191
and at commit time:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
150 / 191
Writesets
Contain the hash for the rows PKs that are changed and in some cases the hashes of foreign keys or others dependencies that
need to be captured (e.g. non NULL UKs). Writesets are gathered during transaction execution.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
151 / 191
Writesets
Contain the hash for the rows PKs that are changed and in some cases the hashes of foreign keys or others dependencies that
need to be captured (e.g. non NULL UKs). Writesets are gathered during transaction execution.
Writes
Called also write values, refers to the actual changes. Write values are also gathered during transaction execution.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
152 / 191
Writeset - examples
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| id | binary(1) | NO | PRI | NULL | |
| name | binary(2) | YES | | NULL | |
+-------+-----------+------+-----+---------+-------+
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
153 / 191
Writeset - examples
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| id | binary(1) | NO | PRI | NULL | |
| name | binary(2) | YES | | NULL | |
+-------+-----------+------+-----+---------+-------+
mysql> insert into t2 values (1,2);
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
154 / 191
Writeset - examples
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| id | binary(1) | NO | PRI | NULL | |
| name | binary(2) | YES | | NULL | |
+-------+-----------+------+-----+---------+-------+
mysql> insert into t2 values (1,2);
pke: PRIMARY | test | t2 | 1 | 1 hash: 11853456929268668462
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
155 / 191
Writeset - examples
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| id | binary(1) | NO | PRI | NULL | |
| name | binary(2) | YES | | NULL | |
+-------+-----------+------+-----+---------+-------+
mysql> insert into t2 values (1,2);
pke: PRIMARY | test | t2 | 1 | 1 hash: 11853456929268668462
mysql> update t2 set name=3 where id=1;
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
156 / 191
Writeset - examples
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| id | binary(1) | NO | PRI | NULL | |
| name | binary(2) | YES | | NULL | |
+-------+-----------+------+-----+---------+-------+
mysql> insert into t2 values (1,2);
pke: PRIMARY | test | t2 | 1 | 1 hash: 11853456929268668462
mysql> update t2 set name=3 where id=1;
pke: PRIMARY | test | t2 | 1 | 1 hash: 10002085147685770725
pke: PRIMARY | test | t2 | 1 | 1 hash: 10002085147685770725
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
157 / 191
Writeset - examples (2)
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| id | binary(1) | NO | PRI | NULL | |
| name | binary(2) | YES | UNI | NULL | |
| name2 | binary(1) | YES | | NULL | |
+-------+-----------+------+-----+---------+-------+
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
158 / 191
Writeset - examples (2)
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| id | binary(1) | NO | PRI | NULL | |
| name | binary(2) | YES | UNI | NULL | |
| name2 | binary(1) | YES | | NULL | |
+-------+-----------+------+-----+---------+-------+
mysql> insert into t3 values (1,2,3);
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
159 / 191
Writeset - examples (2)
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| id | binary(1) | NO | PRI | NULL | |
| name | binary(2) | YES | UNI | NULL | |
| name2 | binary(1) | YES | | NULL | |
+-------+-----------+------+-----+---------+-------+
mysql> insert into t3 values (1,2,3);
pke: PRIMARY | test |t3 | 1 | 1 hash: 79134815725924853
pke: name | test |t3 | 2 hash: 11034644986657565827
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
160 / 191
Writeset - examples (2)
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| id | binary(1) | NO | PRI | NULL | |
| name | binary(2) | YES | UNI | NULL | |
| name2 | binary(1) | YES | | NULL | |
+-------+-----------+------+-----+---------+-------+
mysql> insert into t3 values (1,2,3);
pke: PRIMARY | test |t3 | 1 | 1 hash: 79134815725924853
pke: name | test |t3 | 2 hash: 11034644986657565827
mysql> update t3 set name=3 where id=1;
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
161 / 191
Writeset - examples (2)
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| id | binary(1) | NO | PRI | NULL | |
| name | binary(2) | YES | UNI | NULL | |
| name2 | binary(1) | YES | | NULL | |
+-------+-----------+------+-----+---------+-------+
mysql> insert into t3 values (1,2,3);
pke: PRIMARY | test |t3 | 1 | 1 hash: 79134815725924853
pke: name | test |t3 | 2 hash: 11034644986657565827
mysql> update t3 set name=3 where id=1;
pke: PRIMARY | test | t3 | 1 | 1 hash: 79134815725924853
pke: name | test | t3 | 3 hash: 18082071075512932388
pke: PRIMARY | test | t3 | 1 | 1 hash: 79134815725924853
pke: name | test | t3 | 2 hash: 11034644986657565827
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
162 / 191
Writeset - examples (2)
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| id | binary(1) | NO | PRI | NULL | |
| name | binary(2) | YES | UNI | NULL | |
| name2 | binary(1) | YES | | NULL | |
+-------+-----------+------+-----+---------+-------+
mysql> insert into t3 values (1,2,3);
pke: PRIMARY | test |t3 | 1 | 1 hash: 79134815725924853
pke: name | test |t3 | 2 hash: 11034644986657565827
mysql> update t3 set name=3 where id=1;
pke: PRIMARY | test | t3 | 1 | 1 hash: 79134815725924853
pke: name | test | t3 | 3 hash: 18082071075512932388
pke: PRIMARY | test | t3 | 1 | 1 hash: 79134815725924853
pke: name | test | t3 | 2 hash: 11034644986657565827
[after image]
[before image]
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
163 / 191
Certification
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
164 / 191
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
165 / 191
Enhanced support for large transactions
Message Fragmentation
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
166 / 191
Fragmenting an outgoing message
(1). If the message size exceeds the maximum size that the user allows
(group_replication_communication_max_message_size), the member fragments the message into chunks
that do not exceed the maximum size.
(2). The member broadcasts each chunk to the group, i.e. forwards each chunk individually to XCom.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
167 / 191
Reassembling an incoming message - first fragment
(2). The members conclude that the incoming message is actually a fragment of a bigger message.
(3). The members buffer the incoming fragment because they conclude the fragment is a chunk of a still-incomplete message.
(Fragments contain the necessary metadata to reach this conclusion.)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
168 / 191
Reassembling an incoming message - second fragment
(5). Same as step 3.
(6). Same as step 4.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
169 / 191
Reassembling an incoming message - last fragment
1. The members conclude that the incoming message is actually a fragment of a bigger message.
2. The members conclude that the incoming fragment is the last chunk missing, reassemble the original, whole message, and
process it.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
170 / 191
Houston we have a problem !
Flow Control
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
171 / 191
Flow Control
In Group Replication, every member send statistics about its queues (applier queue and certification queue) to the other members.
Then every node decide to slow down or not if they realize that one node reached the threshold for one of the queue.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
172 / 191
Flow Control
In Group Replication, every member send statistics about its queues (applier queue and certification queue) to the other members.
Then every node decide to slow down or not if they realize that one node reached the threshold for one of the queue.
So when group_replication_ ow_control_mode is set to QUOTA on the node seeing that one of the other
members of the cluster is lagging behind (threshold reached), it will throttle the write operations to the a quota that is calculated
based on the number of transactions applied in the last second, and then it is reduced below that by subtracting the “over the
quota” messages from the last period.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
173 / 191
Flow Control
In Group Replication, every member send statistics about its queues (applier queue and certification queue) to the other members.
Then every node decide to slow down or not if they realize that one node reached the threshold for one of the queue.
So when group_replication_ ow_control_mode is set to QUOTA on the node seeing that one of the other
members of the cluster is lagging behind (threshold reached), it will throttle the write operations to the a quota that is calculated
based on the number of transactions applied in the last second, and then it is reduced below that by subtracting the “over the
quota” messages from the last period.
This mean that the threshold is NOT decided on the node being slow, but the node writing a transaction checks its threshold flow
control values and compare them to the statistics from the other nodes to decide to throttle or not.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
174 / 191
Flow Control - on writer
>quota
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
175 / 191
Flow Control - on all members
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
176 / 191
Flow Control - configuration variables
As in MySQL 8.0.16:
+-----------------------------------------------------+-------+
| Variable_name | Value |
+-----------------------------------------------------+-------+
| group_replication_ ow_control_applier_threshold | 25000 |
| group_replication_ ow_control_certi er_threshold | 25000 |
| group_replication_ ow_control_hold_percent | 10 |
| group_replication_ ow_control_max_quota | 0 |
| group_replication_ ow_control_member_quota_percent | 0 |
| group_replication_ ow_control_min_quota | 0 |
| group_replication_ ow_control_min_recovery_quota | 0 |
| group_replication_ ow_control_mode | QUOTA |
| group_replication_ ow_control_period | 1 |
| group_replication_ ow_control_release_percent | 50 |
+-----------------------------------------------------+-------+
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
177 / 191
transaction's lifecycle in Group Replication
Summary
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
178 / 191
begin;
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
179 / 191
begin;
update table1
set c = 999
where id =2;
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
180 / 191
begin;
update table1
set c = 999
where id =2;
update table1
set b = "eee"
where id = 3;
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
181 / 191
begin;
update table1
set c = 999
where id =2;
update table1
set b = "eee"
where id = 3;
commit;
clientblocksoncommit...
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
182 / 191
begin;
update table1
set c = 999
where id =2;
update table1
set b = "eee"
where id = 3;
commit;
clientblocksoncommit...
writesets
+ gtid_event
+ write values
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
183 / 191
begin;
update table1
set c = 999
where id =2;
update table1
set b = "eee"
where id = 3;
commit;
clientblocksoncommit...
writesets
+ gtid_event
+ write values
certify
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
184 / 191
begin;
update table1
set c = 999
where id =2;
update table1
set b = "eee"
where id = 3;
commit;
clientblocksoncommit...
writesets
+ gtid_event
+ write values
certify
certify
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
185 / 191
begin;
update table1
set c = 999
where id =2;
update table1
set b = "eee"
where id = 3;
commit;
clientblocksoncommit...
writesets
+ gtid_event
+ write values
certify
certify
certify
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
186 / 191
begin;
update table1
set c = 999
where id =2;
update table1
set b = "eee"
where id = 3;
commit;
commit finalized
writesets
+ gtid_event
+ write values
certify
certify
certify
+ GTID
bin
log
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
187 / 191
begin;
update table1
set c = 999
where id =2;
update table1
set b = "eee"
where id = 3;
commit;
commit finalized
writesets
+ gtid_event
+ write values
certify
certify
certify
+ GTID
bin
log
+ GTID
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
188 / 191
begin;
update table1
set c = 999
where id =2;
update table1
set b = "eee"
where id = 3;
commit;
commit finalized
writesets
+ gtid_event
+ write values
certify
certify
certify
+ GTID
bin
log
+ GTID
+ GTIDrelay
log
relay
log
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
189 / 191
begin;
update table1
set c = 999
where id =2;
update table1
set b = "eee"
where id = 3;
commit;
commit finalized
writesets
+ gtid_event
+ write values
certify
certify
certify
+ GTID
bin
log
+ GTID
+ GTIDrelay
log
relay
log
bin
log
bin
log
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
190 / 191
Thank you !
Any Questions ?
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
191 / 191

More Related Content

What's hot

MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group ReplicationKenny Gryp
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsFrederic Descamps
 
MySQL Group Replication - Ready For Production? (2018-04)
MySQL Group Replication - Ready For Production? (2018-04)MySQL Group Replication - Ready For Production? (2018-04)
MySQL Group Replication - Ready For Production? (2018-04)Kenny Gryp
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsFrederic Descamps
 
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
 
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorialMySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorialFrederic Descamps
 
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
 
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
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMario Beck
 
binary log と 2PC と Group Commit
binary log と 2PC と Group Commitbinary log と 2PC と Group Commit
binary log と 2PC と Group CommitTakanori Sejima
 
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)Jean-François Gagné
 
Oracle RAC features on Exadata
Oracle RAC features on ExadataOracle RAC features on Exadata
Oracle RAC features on ExadataAnil Nair
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기I Goo Lee
 
MySQL InnoDB Clusterによる高可用性構成(DB Tech Showcase 2017)
MySQL InnoDB Clusterによる高可用性構成(DB Tech Showcase 2017)MySQL InnoDB Clusterによる高可用性構成(DB Tech Showcase 2017)
MySQL InnoDB Clusterによる高可用性構成(DB Tech Showcase 2017)Shinya Sugiyama
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfSrirakshaSrinivasan2
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Mydbops
 
Scaling paypal workloads with oracle rac ss
Scaling paypal workloads with oracle rac ssScaling paypal workloads with oracle rac ss
Scaling paypal workloads with oracle rac ssAnil Nair
 

What's hot (20)

MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms
 
MySQL Group Replication - Ready For Production? (2018-04)
MySQL Group Replication - Ready For Production? (2018-04)MySQL Group Replication - Ready For Production? (2018-04)
MySQL Group Replication - Ready For Production? (2018-04)
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & Operations
 
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
 
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorialMySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
 
Planning for Disaster Recovery (DR) with Galera Cluster
Planning for Disaster Recovery (DR) with Galera ClusterPlanning for Disaster Recovery (DR) with Galera Cluster
Planning for Disaster Recovery (DR) with Galera Cluster
 
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?
 
MySQL Router REST API
MySQL Router REST APIMySQL Router REST API
MySQL Router REST API
 
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
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster
 
binary log と 2PC と Group Commit
binary log と 2PC と Group Commitbinary log と 2PC と Group Commit
binary log と 2PC と Group Commit
 
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
 
Oracle RAC features on Exadata
Oracle RAC features on ExadataOracle RAC features on Exadata
Oracle RAC features on Exadata
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기
 
MySQL InnoDB Clusterによる高可用性構成(DB Tech Showcase 2017)
MySQL InnoDB Clusterによる高可用性構成(DB Tech Showcase 2017)MySQL InnoDB Clusterによる高可用性構成(DB Tech Showcase 2017)
MySQL InnoDB Clusterによる高可用性構成(DB Tech Showcase 2017)
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
 
Scaling paypal workloads with oracle rac ss
Scaling paypal workloads with oracle rac ssScaling paypal workloads with oracle rac ss
Scaling paypal workloads with oracle rac ss
 

Similar to DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic explained

MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialKenny Gryp
 
How to operate MySQL InnoDB Cluster with MySQL Shell
How to operate MySQL InnoDB Cluster with MySQL ShellHow to operate MySQL InnoDB Cluster with MySQL Shell
How to operate MySQL InnoDB Cluster with MySQL ShellFrederic Descamps
 
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
 
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL ShellMySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL ShellMiguel Araújo
 
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Frederic Descamps
 
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...Frederic Descamps
 
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest TutorialMySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest TutorialFrederic Descamps
 
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!
MySQL Innovation Day Chicago  - MySQL HA So Easy : That's insane !!MySQL Innovation Day Chicago  - MySQL HA So Easy : That's insane !!
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!Frederic Descamps
 
Docker Compose Setup for MySQL InnoDB Cluster
Docker Compose Setup for MySQL InnoDB ClusterDocker Compose Setup for MySQL InnoDB Cluster
Docker Compose Setup for MySQL InnoDB ClusterBalasubramanian Kandasamy
 
Oracle Open World 2018 / Code One : MySQL 8.0 High Availability with MySQL I...
Oracle Open World 2018 / Code One  : MySQL 8.0 High Availability with MySQL I...Oracle Open World 2018 / Code One  : MySQL 8.0 High Availability with MySQL I...
Oracle Open World 2018 / Code One : MySQL 8.0 High Availability with MySQL I...Frederic Descamps
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterFrederic Descamps
 
MySQL Shell: the best DBA tool ?
MySQL Shell: the best DBA tool ?MySQL Shell: the best DBA tool ?
MySQL Shell: the best DBA tool ?Frederic Descamps
 
DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !Frederic Descamps
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterFrederic Descamps
 
MySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a NutshellMySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a NutshellFrederic Descamps
 
Boston meetup : MySQL Innodb Cluster - May 1st 2017
Boston meetup : MySQL Innodb Cluster - May 1st  2017Boston meetup : MySQL Innodb Cluster - May 1st  2017
Boston meetup : MySQL Innodb Cluster - May 1st 2017Frederic Descamps
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterFrederic Descamps
 
How to write efficient and correct MySQL recipes for you configuration manage...
How to write efficient and correct MySQL recipes for you configuration manage...How to write efficient and correct MySQL recipes for you configuration manage...
How to write efficient and correct MySQL recipes for you configuration manage...Frederic Descamps
 
Patching like a hero - DOAG
Patching like a hero -  DOAGPatching like a hero -  DOAG
Patching like a hero - DOAGRodrigo Mufalani
 
MySQL InnoDB Cluster in a Nutshell - Hands-on Lab
MySQL InnoDB Cluster in a Nutshell - Hands-on LabMySQL InnoDB Cluster in a Nutshell - Hands-on Lab
MySQL InnoDB Cluster in a Nutshell - Hands-on LabFrederic Descamps
 

Similar to DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic explained (20)

MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn Tutorial
 
How to operate MySQL InnoDB Cluster with MySQL Shell
How to operate MySQL InnoDB Cluster with MySQL ShellHow to operate MySQL InnoDB Cluster with MySQL Shell
How to operate MySQL InnoDB Cluster with MySQL Shell
 
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
 
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL ShellMySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
 
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
 
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...
 
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest TutorialMySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
 
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!
MySQL Innovation Day Chicago  - MySQL HA So Easy : That's insane !!MySQL Innovation Day Chicago  - MySQL HA So Easy : That's insane !!
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!
 
Docker Compose Setup for MySQL InnoDB Cluster
Docker Compose Setup for MySQL InnoDB ClusterDocker Compose Setup for MySQL InnoDB Cluster
Docker Compose Setup for MySQL InnoDB Cluster
 
Oracle Open World 2018 / Code One : MySQL 8.0 High Availability with MySQL I...
Oracle Open World 2018 / Code One  : MySQL 8.0 High Availability with MySQL I...Oracle Open World 2018 / Code One  : MySQL 8.0 High Availability with MySQL I...
Oracle Open World 2018 / Code One : MySQL 8.0 High Availability with MySQL I...
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
 
MySQL Shell: the best DBA tool ?
MySQL Shell: the best DBA tool ?MySQL Shell: the best DBA tool ?
MySQL Shell: the best DBA tool ?
 
DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
 
MySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a NutshellMySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a Nutshell
 
Boston meetup : MySQL Innodb Cluster - May 1st 2017
Boston meetup : MySQL Innodb Cluster - May 1st  2017Boston meetup : MySQL Innodb Cluster - May 1st  2017
Boston meetup : MySQL Innodb Cluster - May 1st 2017
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
 
How to write efficient and correct MySQL recipes for you configuration manage...
How to write efficient and correct MySQL recipes for you configuration manage...How to write efficient and correct MySQL recipes for you configuration manage...
How to write efficient and correct MySQL recipes for you configuration manage...
 
Patching like a hero - DOAG
Patching like a hero -  DOAGPatching like a hero -  DOAG
Patching like a hero - DOAG
 
MySQL InnoDB Cluster in a Nutshell - Hands-on Lab
MySQL InnoDB Cluster in a Nutshell - Hands-on LabMySQL InnoDB Cluster in a Nutshell - Hands-on Lab
MySQL InnoDB Cluster in a Nutshell - Hands-on Lab
 

More from Frederic Descamps

MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...Frederic Descamps
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionFrederic Descamps
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsFrederic Descamps
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfFrederic Descamps
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8Frederic Descamps
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022Frederic Descamps
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodeFrederic Descamps
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemFrederic Descamps
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemFrederic Descamps
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database ServiceFrederic Descamps
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQLFrederic Descamps
 
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...Frederic Descamps
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Frederic Descamps
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Frederic Descamps
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021Frederic Descamps
 
Deploying Magento on OCI with MDS
Deploying Magento on OCI with MDSDeploying Magento on OCI with MDS
Deploying Magento on OCI with MDSFrederic Descamps
 
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...Frederic Descamps
 
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
Cloud native -  Why to use MySQL 8.0 and how to use it on oci with MDSCloud native -  Why to use MySQL 8.0 and how to use it on oci with MDS
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDSFrederic Descamps
 
MySQL Database Service Webinar: Installing Drupal in oci with mds
MySQL Database Service Webinar: Installing Drupal in oci with mdsMySQL Database Service Webinar: Installing Drupal in oci with mds
MySQL Database Service Webinar: Installing Drupal in oci with mdsFrederic Descamps
 
the State of the Dolphin - October 2020
the State of the Dolphin - October 2020the State of the Dolphin - October 2020
the State of the Dolphin - October 2020Frederic Descamps
 

More from Frederic Descamps (20)

MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and Histograms
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio Code
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database System
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQL
 
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021
 
Deploying Magento on OCI with MDS
Deploying Magento on OCI with MDSDeploying Magento on OCI with MDS
Deploying Magento on OCI with MDS
 
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
 
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
Cloud native -  Why to use MySQL 8.0 and how to use it on oci with MDSCloud native -  Why to use MySQL 8.0 and how to use it on oci with MDS
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
 
MySQL Database Service Webinar: Installing Drupal in oci with mds
MySQL Database Service Webinar: Installing Drupal in oci with mdsMySQL Database Service Webinar: Installing Drupal in oci with mds
MySQL Database Service Webinar: Installing Drupal in oci with mds
 
the State of the Dolphin - October 2020
the State of the Dolphin - October 2020the State of the Dolphin - October 2020
the State of the Dolphin - October 2020
 

Recently uploaded

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
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
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"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
 

Recently uploaded (20)

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"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
 

DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic explained

  • 2. 2 / 1912 / 191
  • 3.   Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purpose 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 up in making purchasing decisions. The development, release and timing of any features or functionality described for Oracle´s product remains at the sole discretion of Oracle. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 3 / 191
  • 4. about.me/lefred Who am I ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 4 / 191
  • 5. Frédéric Descamps @lefred MySQL Evangelist Managing MySQL since 3.23 devops believer living in Belgium 🇧🇪 https://lefred.be   Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 5 / 191
  • 6. Group Replication: heart of MySQL InnoDB Cluster Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 6 / 191
  • 7. Group Replication: heart of MySQL InnoDB Cluster Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 7 / 191
  • 8. MySQL Group Replication but what is it ?!? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 8 / 191
  • 9. GR is a plugin for MySQL, made by MySQL and packaged with MySQL GR is an implementation of Replicated Database State Machine theory Paxos based protocol GR allows to write on all Group Members (cluster nodes) simultaneously while retaining consistency GR implements conflict detection and resolution GR allows automatic distributed recovery Automatic failover Automatic membership configuration Adding/removing members Network partitions, failures Prevents data loss Supported on all MySQL platforms !! Linux, Windows, Solaris, OSX, FreeBSD Completely Open Source - GPL ! No license required to have High Availability MySQL Group Replication but what is it ?!? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 9 / 191
  • 10. Group Replication is nice, but how does it work ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 10 / 191
  • 11. Group Replication is nice, but how does it work ? it´s just ... Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 11 / 191
  • 12. Group Replication is nice, but how does it work ? it´s just ... Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 12 / 191
  • 13. Group Replication is nice, but how does it work ? it´s just ... ... no, in fact the writesets replication is synchronous and then certification and apply of the changes are local to each nodes and asynchronous. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 13 / 191
  • 14. Group Replication is nice, but how does it work ? it´s just ... ... no, in fact the writesets replication is synchronous and then certification and apply of the changes are local to each nodes and asynchronous. not that easy to understand... right ? As a picture is worth a 1000 words, let´s illustrate this... Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 14 / 191
  • 15. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 15 / 191
  • 16. MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 16 / 191
  • 17. MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 17 / 191
  • 18. MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 18 / 191
  • 19. MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 19 / 191
  • 20. MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 20 / 191
  • 21. MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 21 / 191
  • 22. MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 22 / 191
  • 23. MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 23 / 191
  • 24. MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 24 / 191
  • 25. MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 25 / 191
  • 26. MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 26 / 191
  • 27. MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 27 / 191
  • 28. MySQL Group Replication (full transaction) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 28 / 191
  • 29. MySQL Group Replication (full transaction) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 29 / 191
  • 30. MySQL Group Replication (full transaction) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 30 / 191
  • 31. MySQL Group Replication (full transaction) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 31 / 191
  • 32. MySQL Group Replication (full transaction) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 32 / 191
  • 33. MySQL Group Replication (full transaction) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 33 / 191
  • 34. MySQL Group Replication (full transaction) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 34 / 191
  • 35. MySQL Group Replication (full transaction) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 35 / 191
  • 36. MySQL Group Replication (full transaction) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 36 / 191
  • 37. MySQL Group Communication System (GCS) MySQL Xcom protocol Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 37 / 191
  • 38. MySQL Group Communication System (GCS) MySQL Xcom protocol Replicated Database State Machine Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 38 / 191
  • 39. MySQL Group Communication System (GCS) MySQL Xcom protocol Replicated Database State Machine Paxos based protocol (a variant of Mencius) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 39 / 191
  • 40. MySQL Group Communication System (GCS) MySQL Xcom protocol Replicated Database State Machine Paxos based protocol (a variant of Mencius) its task: deliver messages across the distributed system: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 40 / 191
  • 41. MySQL Group Communication System (GCS) MySQL Xcom protocol Replicated Database State Machine Paxos based protocol (a variant of Mencius) its task: deliver messages across the distributed system: atomically Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 41 / 191
  • 42. MySQL Group Communication System (GCS) MySQL Xcom protocol Replicated Database State Machine Paxos based protocol (a variant of Mencius) its task: deliver messages across the distributed system: atomically in Total Order (Writes) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 42 / 191
  • 43. MySQL Group Communication System (GCS) MySQL Xcom protocol Replicated Database State Machine Paxos based protocol (a variant of Mencius) its task: deliver messages across the distributed system: atomically in Total Order (Writes) MySQL Group Replication receives the Ordered 'tickets' from this GCS subsystem. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 43 / 191
  • 44. Architecture, Stack, Core, ... MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 44 / 191
  • 45. MySQL Group Replication - Architecture Node Types: R: Traffic routers/proxies: MySQL Router, HAProxy, ProxySQL... M: mysqld nodes participating in MySQL Group Replication Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 45 / 191
  • 46. MySQL Group Replication - Stack Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 46 / 191
  • 47. Server calls into the plugin through a generic interface Most server internals are hidden from the plugin Plugin interacts with the server through a generic interface Replication plugin determines the fate of the commit operation through a well defined server interface The plugin makes use of the relay log infrastructure to inject changes in the receiving server MySQL Group Replication - Core Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 47 / 191
  • 48. Maintaining distributed execution context Detecting and Resolving conflicts Handling distributed recovery Detect membership changes Donate state if needed Collect state if needed Proposing transactions to other members Receiving and handling transactions from other members Deciding the ultimate fate of transactions commit or rollback MySQL Group Replication - GR Plugin Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 48 / 191
  • 49. The communication API (and binding) is responsible for: Abstracting the underlying group communication system implementation from the plugin itself Mapping the interface to a specific group communication system implementation The Group Communication System engine: Paxos implementation (Similar to Paxos Mencius) Building block to provide distributed agreement between servers MySQL Group Replication - GCS Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 49 / 191
  • 50. Total Order GTID generation Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 50 / 191
  • 51. MySQL Group Replication uses MySQL replication framework by design: binary logs Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 51 / 191
  • 52. MySQL Group Replication uses MySQL replication framework by design: binary logs relay logs Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 52 / 191
  • 53. MySQL Group Replication uses MySQL replication framework by design: binary logs relay logs GTIDs: Global Transaction IDs Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 53 / 191
  • 54. How does Group Replication handle GTIDs ? There are two ways of generating GTIDs: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 54 / 191
  • 55. How does Group Replication handle GTIDs ? There are two ways of generating GTIDs: AUTOMATIC: the transaction is assigned with an automatically generated id during commit. Where regular replication uses the source server UUID, on Group Replication, the group name is used. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 55 / 191
  • 56. How does Group Replication handle GTIDs ? There are two ways of generating GTIDs: AUTOMATIC: the transaction is assigned with an automatically generated id during commit. Where regular replication uses the source server UUID, on Group Replication, the group name is used. ASSIGNED: the user assigns manually a GTID through SET GTID_NEXT to the transaction. This is common to any replication format and the id is assigned before the transaction starts. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 56 / 191
  • 57. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 57 / 191
  • 58. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 58 / 191
  • 59. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 59 / 191
  • 60. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 60 / 191
  • 61. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 61 / 191
  • 62. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 62 / 191
  • 63. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 63 / 191
  • 64. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 64 / 191
  • 65. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 65 / 191
  • 66. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 66 / 191
  • 67. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 67 / 191
  • 68. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 68 / 191
  • 69. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 69 / 191
  • 70. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 70 / 191
  • 71. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 71 / 191
  • 72. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 72 / 191
  • 73. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 73 / 191
  • 74. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 74 / 191
  • 75. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 75 / 191
  • 76. Group Replication : Total Order Delivery - GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 76 / 191
  • 77. Group Replication : GTID The previous example was not totally in sync with reality. In fact, a writer allocates a block of GTID and when we have multiple writes (multi-primary mode) all writers will use GTID sequence numbers in their allocated block. The size of the block is defined by group_replication_gtid_assignment_block_size (default to 1M) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 77 / 191
  • 78. Group Replication : GTID Example: Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 78 / 191
  • 79. Group Replication : GTID Example: Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355 New write on an other node: Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355,1000354 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 79 / 191
  • 80. Group Replication : GTID Example: Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355 New write on an other node: Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355,1000354 Let's write on the third node: Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355:1000354:2000354 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 80 / 191
  • 81. Group Replication : GTID Example: Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355 New write on an other node: Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355,1000354 Let's write on the third node: Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-355:1000354:2000354 And writing back on the first one: Executed_Gtid_Set: 0b5c746d-d552-11e8-bef0-08002718d305:1-356:1000354:2000354 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 81 / 191
  • 82. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 82 / 191
  • 83. done ! Return from Commit Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 83 / 191
  • 84. Group Replication: return from commit Asynchronous Replication: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 84 / 191
  • 85. Group Replication: return from commit (2) Semi-Sync Replication: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 85 / 191
  • 86. (*): eventual Group Replication: return from commit (3) Group Replication (*): Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 86 / 191
  • 87. (*): before Group Replication: return from commit (4) Group Replication (*): Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 87 / 191
  • 88. (*): after Group Replication: return from commit (5) Group Replication (*): Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 88 / 191
  • 89. Does this mean we can have a distant node and always let it ack later ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 89 / 191
  • 90. Does this mean we can have a distant node and always let it ack later ? NO! Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 90 / 191
  • 91. Does this mean we can have a distant node and always let it ack later ? NO! Because the system has to wait for the noop (single skip message) from the “distant” node where latency is higher The size of the GCS consensus messages window can be get and set from UDF functions: group_replication_get_write_concurrency(), group_replication_set_write_concurrency() mysql> select group_replication_get_write_concurrency(); +-------------------------------------------+ | group_replication_get_write_concurrency() | +-------------------------------------------+ | 10 | +-------------------------------------------+ Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 91 / 191
  • 92. Event Horizon GCS Write Consensus Concurrency Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 92 / 191
  • 93. Event Horizon GCS Write Consensus Concurrency group replication write concurrency Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 93 / 191
  • 94. Event Horizon GCS Write Consensus Concurrency group replication write concurrency Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 94 / 191
  • 95. Event Horizon GCS Write Consensus Concurrency group replication write concurrency Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 95 / 191
  • 96. Event Horizon GCS Write Consensus Concurrency Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 96 / 191
  • 97. Event Horizon GCS Write Consensus Concurrency Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 97 / 191
  • 98. Event Horizon GCS Write Consensus Concurrency Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 98 / 191
  • 99. Event Horizon GCS Write Consensus Concurrency Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 99 / 191
  • 100. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 100 / 191
  • 101. conflict Optimistic Locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 101 / 191
  • 102. Group Replication : Optimistic Locking Group Replication uses optimistic locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 102 / 191
  • 103. Group Replication : Optimistic Locking Group Replication uses optimistic locking during a transaction, local (InnoDB) locking happens Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 103 / 191
  • 104. Group Replication : Optimistic Locking Group Replication uses optimistic locking during a transaction, local (InnoDB) locking happens optimistically assumes there will be no conflicts across nodes (no communication between nodes necessary) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 104 / 191
  • 105. Group Replication : Optimistic Locking Group Replication uses optimistic locking during a transaction, local (InnoDB) locking happens optimistically assumes there will be no conflicts across nodes (no communication between nodes necessary) cluster-wide conflict resolution happens only at COMMIT, during certification Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 105 / 191
  • 106. Group Replication : Optimistic Locking Group Replication uses optimistic locking during a transaction, local (InnoDB) locking happens optimistically assumes there will be no conflicts across nodes (no communication between nodes necessary) cluster-wide conflict resolution happens only at COMMIT, during certification Let´s first have a look at the traditional locking to compare. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 106 / 191
  • 107. Traditional locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 107 / 191
  • 108. Traditional locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 108 / 191
  • 109. Traditional locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 109 / 191
  • 110. Traditional locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 110 / 191
  • 111. Traditional locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 111 / 191
  • 112. Traditional locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 112 / 191
  • 113. Optimistic Locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 113 / 191
  • 114. Optimistic Locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 114 / 191
  • 115. Optimistic Locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 115 / 191
  • 116. Optimistic Locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 116 / 191
  • 117. Optimistic Locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 117 / 191
  • 118. Optimistic Locking Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 118 / 191
  • 119. Optimistic Locking The system returns error 149 as certification failed: ERROR 1180 (HY000): Got error 149 during COMMIT Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 119 / 191
  • 120. Optimistic Locking (2) The conflict detection can happen at two different stage: Only one of the two transactions was sent to the Group and the other one is still running (local). If both transaction were sent to the Group at almost the same time and both reached GCS/XCOM. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 120 / 191
  • 121. Optimistic Locking (3) Only one transaction was sent to GCS and the other conflicting one is still local: In this case, it's the high priority transaction mechanism of InnoDB that kills the local one: If you try any statement in the transaction's session you will see: ERROR: 1213: Deadlock found when trying to get lock; try restarting transaction If you try to commit the transaction you will see: ERROR: 1180: Got error 149 - 'Lock deadlock; Retry transaction' during COMMIT Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 121 / 191
  • 122. Optimistic Locking (4) Both transactions were sent to GCS: The second transaction (the conflicting one) will return: ERROR 3101 (40000): Plugin instructed the server to rollback the current transaction. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 122 / 191
  • 123. Such conflicts happen only when using multi-primary group !   not totally true in MySQL < 8.0.13 when failover happens Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 123 / 191
  • 124. Drawbacks of optimistic locking having a first-committer-wins system means conflicts will more likely happen when writing on multiple members with: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 124 / 191
  • 125. Drawbacks of optimistic locking having a first-committer-wins system means conflicts will more likely happen when writing on multiple members with: large transactions Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 125 / 191
  • 126. Drawbacks of optimistic locking having a first-committer-wins system means conflicts will more likely happen when writing on multiple members with: large transactions long running transactions Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 126 / 191
  • 127. Drawbacks of optimistic locking having a first-committer-wins system means conflicts will more likely happen when writing on multiple members with: large transactions long running transactions hotspot records Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 127 / 191
  • 128. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 128 / 191
  • 129. Configurable Consistency Guarantees Consistency Levels Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 129 / 191
  • 130. mysql> show variables like 'group_replication_consistency'; +-------------------------------+----------+ | Variable_name | Value | +-------------------------------+----------+ | group_replication_consistency | EVENTUAL | +-------------------------------+----------+     Consistency: EVENTUAL (default) By default, there is no synchronization point for the transactions, when you perform a write on a node, if you immediately read the same data on another node, it is eventually there. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 130 / 191
  • 131. mysql> show variables like 'group_replication_consistency'; +-------------------------------+----------+ | Variable_name | Value | +-------------------------------+----------+ | group_replication_consistency | EVENTUAL | +-------------------------------+----------+     Consistency: EVENTUAL (default) By default, there is no synchronization point for the transactions, when you perform a write on a node, if you immediately read the same data on another node, it is eventually there. Since MySQL 8.0.16, we have to possibility to set the synchronization point at read or at write or both (globally or for a session). Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 131 / 191
  • 132. Consistency: BEFORE (READ) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 132 / 191
  • 133. Consistency: AFTER (WRITE) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 133 / 191
  • 134. Consistency: BEFORE_AND_AFTER Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 134 / 191
  • 135. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 135 / 191
  • 136. can the transaction be committed ? Certification Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 136 / 191
  • 137. Certification Certification is the process that only needs to answer the following unique question: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 137 / 191
  • 138. Certification Certification is the process that only needs to answer the following unique question: can the write (transaction) be committed ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 138 / 191
  • 139. Certification Certification is the process that only needs to answer the following unique question: can the write (transaction) be committed ? based on yet to be applied transactions Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 139 / 191
  • 140. Certification Certification is the process that only needs to answer the following unique question: can the write (transaction) be committed ? based on yet to be applied transactions such conflicts must come for other members/nodes Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 140 / 191
  • 141. Certification Certification is the process that only needs to answer the following unique question: can the write (transaction) be committed ? based on yet to be applied transactions such conflicts must come for other members/nodes happens on every member/node and is deterministic Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 141 / 191
  • 142. Certification Certification is the process that only needs to answer the following unique question: can the write (transaction) be committed ? based on yet to be applied transactions such conflicts must come for other members/nodes happens on every member/node and is deterministic results are not reported to the group (does not require a new communication step) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 142 / 191
  • 143. Certification Certification is the process that only needs to answer the following unique question: can the write (transaction) be committed ? based on yet to be applied transactions such conflicts must come for other members/nodes happens on every member/node and is deterministic results are not reported to the group (does not require a new communication step) pass: commit/queue to appy Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 143 / 191
  • 144. Certification Certification is the process that only needs to answer the following unique question: can the write (transaction) be committed ? based on yet to be applied transactions such conflicts must come for other members/nodes happens on every member/node and is deterministic results are not reported to the group (does not require a new communication step) pass: commit/queue to appy fail: rollback/drop the transaction Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 144 / 191
  • 145. Certification Certification is the process that only needs to answer the following unique question: can the write (transaction) be committed ? based on yet to be applied transactions such conflicts must come for other members/nodes happens on every member/node and is deterministic results are not reported to the group (does not require a new communication step) pass: commit/queue to appy fail: rollback/drop the transaction serialized by the total order in GCS/XCOM + GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 145 / 191
  • 146. Certification Certification is the process that only needs to answer the following unique question: can the write (transaction) be committed ? based on yet to be applied transactions such conflicts must come for other members/nodes happens on every member/node and is deterministic results are not reported to the group (does not require a new communication step) pass: commit/queue to appy fail: rollback/drop the transaction serialized by the total order in GCS/XCOM + GTID cost is based on trx size (# rows & # keys) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 146 / 191
  • 147. terminology Write vs Writeset Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 147 / 191
  • 148. Let's illustrate a table: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 148 / 191
  • 149. Now let's make a change Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 149 / 191
  • 150. and at commit time: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 150 / 191
  • 151. Writesets Contain the hash for the rows PKs that are changed and in some cases the hashes of foreign keys or others dependencies that need to be captured (e.g. non NULL UKs). Writesets are gathered during transaction execution. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 151 / 191
  • 152. Writesets Contain the hash for the rows PKs that are changed and in some cases the hashes of foreign keys or others dependencies that need to be captured (e.g. non NULL UKs). Writesets are gathered during transaction execution. Writes Called also write values, refers to the actual changes. Write values are also gathered during transaction execution. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 152 / 191
  • 153. Writeset - examples +-------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-----+---------+-------+ | id | binary(1) | NO | PRI | NULL | | | name | binary(2) | YES | | NULL | | +-------+-----------+------+-----+---------+-------+ Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 153 / 191
  • 154. Writeset - examples +-------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-----+---------+-------+ | id | binary(1) | NO | PRI | NULL | | | name | binary(2) | YES | | NULL | | +-------+-----------+------+-----+---------+-------+ mysql> insert into t2 values (1,2); Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 154 / 191
  • 155. Writeset - examples +-------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-----+---------+-------+ | id | binary(1) | NO | PRI | NULL | | | name | binary(2) | YES | | NULL | | +-------+-----------+------+-----+---------+-------+ mysql> insert into t2 values (1,2); pke: PRIMARY | test | t2 | 1 | 1 hash: 11853456929268668462 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 155 / 191
  • 156. Writeset - examples +-------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-----+---------+-------+ | id | binary(1) | NO | PRI | NULL | | | name | binary(2) | YES | | NULL | | +-------+-----------+------+-----+---------+-------+ mysql> insert into t2 values (1,2); pke: PRIMARY | test | t2 | 1 | 1 hash: 11853456929268668462 mysql> update t2 set name=3 where id=1; Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 156 / 191
  • 157. Writeset - examples +-------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-----+---------+-------+ | id | binary(1) | NO | PRI | NULL | | | name | binary(2) | YES | | NULL | | +-------+-----------+------+-----+---------+-------+ mysql> insert into t2 values (1,2); pke: PRIMARY | test | t2 | 1 | 1 hash: 11853456929268668462 mysql> update t2 set name=3 where id=1; pke: PRIMARY | test | t2 | 1 | 1 hash: 10002085147685770725 pke: PRIMARY | test | t2 | 1 | 1 hash: 10002085147685770725 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 157 / 191
  • 158. Writeset - examples (2) +-------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-----+---------+-------+ | id | binary(1) | NO | PRI | NULL | | | name | binary(2) | YES | UNI | NULL | | | name2 | binary(1) | YES | | NULL | | +-------+-----------+------+-----+---------+-------+ Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 158 / 191
  • 159. Writeset - examples (2) +-------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-----+---------+-------+ | id | binary(1) | NO | PRI | NULL | | | name | binary(2) | YES | UNI | NULL | | | name2 | binary(1) | YES | | NULL | | +-------+-----------+------+-----+---------+-------+ mysql> insert into t3 values (1,2,3); Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 159 / 191
  • 160. Writeset - examples (2) +-------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-----+---------+-------+ | id | binary(1) | NO | PRI | NULL | | | name | binary(2) | YES | UNI | NULL | | | name2 | binary(1) | YES | | NULL | | +-------+-----------+------+-----+---------+-------+ mysql> insert into t3 values (1,2,3); pke: PRIMARY | test |t3 | 1 | 1 hash: 79134815725924853 pke: name | test |t3 | 2 hash: 11034644986657565827 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 160 / 191
  • 161. Writeset - examples (2) +-------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-----+---------+-------+ | id | binary(1) | NO | PRI | NULL | | | name | binary(2) | YES | UNI | NULL | | | name2 | binary(1) | YES | | NULL | | +-------+-----------+------+-----+---------+-------+ mysql> insert into t3 values (1,2,3); pke: PRIMARY | test |t3 | 1 | 1 hash: 79134815725924853 pke: name | test |t3 | 2 hash: 11034644986657565827 mysql> update t3 set name=3 where id=1; Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 161 / 191
  • 162. Writeset - examples (2) +-------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-----+---------+-------+ | id | binary(1) | NO | PRI | NULL | | | name | binary(2) | YES | UNI | NULL | | | name2 | binary(1) | YES | | NULL | | +-------+-----------+------+-----+---------+-------+ mysql> insert into t3 values (1,2,3); pke: PRIMARY | test |t3 | 1 | 1 hash: 79134815725924853 pke: name | test |t3 | 2 hash: 11034644986657565827 mysql> update t3 set name=3 where id=1; pke: PRIMARY | test | t3 | 1 | 1 hash: 79134815725924853 pke: name | test | t3 | 3 hash: 18082071075512932388 pke: PRIMARY | test | t3 | 1 | 1 hash: 79134815725924853 pke: name | test | t3 | 2 hash: 11034644986657565827 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 162 / 191
  • 163. Writeset - examples (2) +-------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-----+---------+-------+ | id | binary(1) | NO | PRI | NULL | | | name | binary(2) | YES | UNI | NULL | | | name2 | binary(1) | YES | | NULL | | +-------+-----------+------+-----+---------+-------+ mysql> insert into t3 values (1,2,3); pke: PRIMARY | test |t3 | 1 | 1 hash: 79134815725924853 pke: name | test |t3 | 2 hash: 11034644986657565827 mysql> update t3 set name=3 where id=1; pke: PRIMARY | test | t3 | 1 | 1 hash: 79134815725924853 pke: name | test | t3 | 3 hash: 18082071075512932388 pke: PRIMARY | test | t3 | 1 | 1 hash: 79134815725924853 pke: name | test | t3 | 2 hash: 11034644986657565827 [after image] [before image] Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 163 / 191
  • 164. Certification Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 164 / 191
  • 165. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 165 / 191
  • 166. Enhanced support for large transactions Message Fragmentation Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 166 / 191
  • 167. Fragmenting an outgoing message (1). If the message size exceeds the maximum size that the user allows (group_replication_communication_max_message_size), the member fragments the message into chunks that do not exceed the maximum size. (2). The member broadcasts each chunk to the group, i.e. forwards each chunk individually to XCom. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 167 / 191
  • 168. Reassembling an incoming message - first fragment (2). The members conclude that the incoming message is actually a fragment of a bigger message. (3). The members buffer the incoming fragment because they conclude the fragment is a chunk of a still-incomplete message. (Fragments contain the necessary metadata to reach this conclusion.) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 168 / 191
  • 169. Reassembling an incoming message - second fragment (5). Same as step 3. (6). Same as step 4. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 169 / 191
  • 170. Reassembling an incoming message - last fragment 1. The members conclude that the incoming message is actually a fragment of a bigger message. 2. The members conclude that the incoming fragment is the last chunk missing, reassemble the original, whole message, and process it. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 170 / 191
  • 171. Houston we have a problem ! Flow Control Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 171 / 191
  • 172. Flow Control In Group Replication, every member send statistics about its queues (applier queue and certification queue) to the other members. Then every node decide to slow down or not if they realize that one node reached the threshold for one of the queue. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 172 / 191
  • 173. Flow Control In Group Replication, every member send statistics about its queues (applier queue and certification queue) to the other members. Then every node decide to slow down or not if they realize that one node reached the threshold for one of the queue. So when group_replication_ ow_control_mode is set to QUOTA on the node seeing that one of the other members of the cluster is lagging behind (threshold reached), it will throttle the write operations to the a quota that is calculated based on the number of transactions applied in the last second, and then it is reduced below that by subtracting the “over the quota” messages from the last period. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 173 / 191
  • 174. Flow Control In Group Replication, every member send statistics about its queues (applier queue and certification queue) to the other members. Then every node decide to slow down or not if they realize that one node reached the threshold for one of the queue. So when group_replication_ ow_control_mode is set to QUOTA on the node seeing that one of the other members of the cluster is lagging behind (threshold reached), it will throttle the write operations to the a quota that is calculated based on the number of transactions applied in the last second, and then it is reduced below that by subtracting the “over the quota” messages from the last period. This mean that the threshold is NOT decided on the node being slow, but the node writing a transaction checks its threshold flow control values and compare them to the statistics from the other nodes to decide to throttle or not. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 174 / 191
  • 175. Flow Control - on writer >quota Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 175 / 191
  • 176. Flow Control - on all members Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 176 / 191
  • 177. Flow Control - configuration variables As in MySQL 8.0.16: +-----------------------------------------------------+-------+ | Variable_name | Value | +-----------------------------------------------------+-------+ | group_replication_ ow_control_applier_threshold | 25000 | | group_replication_ ow_control_certi er_threshold | 25000 | | group_replication_ ow_control_hold_percent | 10 | | group_replication_ ow_control_max_quota | 0 | | group_replication_ ow_control_member_quota_percent | 0 | | group_replication_ ow_control_min_quota | 0 | | group_replication_ ow_control_min_recovery_quota | 0 | | group_replication_ ow_control_mode | QUOTA | | group_replication_ ow_control_period | 1 | | group_replication_ ow_control_release_percent | 50 | +-----------------------------------------------------+-------+ Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 177 / 191
  • 178. transaction's lifecycle in Group Replication Summary Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 178 / 191
  • 179. begin; Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 179 / 191
  • 180. begin; update table1 set c = 999 where id =2; Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 180 / 191
  • 181. begin; update table1 set c = 999 where id =2; update table1 set b = "eee" where id = 3; Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 181 / 191
  • 182. begin; update table1 set c = 999 where id =2; update table1 set b = "eee" where id = 3; commit; clientblocksoncommit... Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 182 / 191
  • 183. begin; update table1 set c = 999 where id =2; update table1 set b = "eee" where id = 3; commit; clientblocksoncommit... writesets + gtid_event + write values Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 183 / 191
  • 184. begin; update table1 set c = 999 where id =2; update table1 set b = "eee" where id = 3; commit; clientblocksoncommit... writesets + gtid_event + write values certify Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 184 / 191
  • 185. begin; update table1 set c = 999 where id =2; update table1 set b = "eee" where id = 3; commit; clientblocksoncommit... writesets + gtid_event + write values certify certify Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 185 / 191
  • 186. begin; update table1 set c = 999 where id =2; update table1 set b = "eee" where id = 3; commit; clientblocksoncommit... writesets + gtid_event + write values certify certify certify Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 186 / 191
  • 187. begin; update table1 set c = 999 where id =2; update table1 set b = "eee" where id = 3; commit; commit finalized writesets + gtid_event + write values certify certify certify + GTID bin log Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 187 / 191
  • 188. begin; update table1 set c = 999 where id =2; update table1 set b = "eee" where id = 3; commit; commit finalized writesets + gtid_event + write values certify certify certify + GTID bin log + GTID Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 188 / 191
  • 189. begin; update table1 set c = 999 where id =2; update table1 set b = "eee" where id = 3; commit; commit finalized writesets + gtid_event + write values certify certify certify + GTID bin log + GTID + GTIDrelay log relay log Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 189 / 191
  • 190. begin; update table1 set c = 999 where id =2; update table1 set b = "eee" where id = 3; commit; commit finalized writesets + gtid_event + write values certify certify certify + GTID bin log + GTID + GTIDrelay log relay log bin log bin log Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 190 / 191
  • 191. Thank you ! Any Questions ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 191 / 191