SlideShare a Scribd company logo
1 of 81
Download to read offline
MySQL InnoDB Cluster and
Group Replication
Madhusudhan G Joshi
(madhusudhan.joshi@oracle.com)
Software Development Manager
Sujatha Sivakumar
(sujatha.sivakumar@oracle.com)
Principal Member Technical Staf
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20172
Safe Harbour Statement
The following is intended to outline our general product direction. It
is intended for information purposes only, and may not be
incorporated into any contract.
It is not a commitment to deliver any material, code, or
functionality, and should not be relied upon in making purchasing
decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole
discretion of Oracle.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20173
Program Agenda
Introduction to MySQL Innodb Cluster
How to get it working
Introduction to Group Replication
Look and Feel of GR!
Monitoring
1
2
3
4
5
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20174
Introduction to MySQL Innodb Cluster1
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20175
InnoDB Cluster
Integrated Solution
●
Group Replication for high availability.
●
Asynchronous Replication for Read Scale-
out.
●
One-stop shell to deploy and manage the
cluster.
●
Seamlessly and automatically route the
workload to the proper database server
in the cluster.
●
Hide failures from the application.
M
M M
MySQL Connector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MQL Shell
HA
S1 S2 S3 S4 S…
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20176
How to get it working2
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20177
MySQL InnoDB Cluster
•
Start MySQL Shell
•
Deploy Instance (s)
•
dba.deploySandboxInstance(....)
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20178
MySQL InnoDB Cluster
•
Start MySQL Shell
•
Deploy Instance (s)
•
Initiate/Create ClusterInitiate/Create Cluster
shell.connect("root@localhost:1310");shell.connect("root@localhost:1310");
cluster = dba.createCluster('OSIcluster');cluster = dba.createCluster('OSIcluster');
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20179
MySQL InnoDB Cluster
few more moments ….
Is the Cluster on and available ?
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201710
MySQL InnoDB Cluster
•
Start MySQL Shell
•
Deploy Instance (s)
•
Create Cluster
Add few more instancesAdd few more instances
myOSI.addInstance("root@localhost:XXXX")myOSI.addInstance("root@localhost:XXXX")
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201711
MySQL InnoDB Cluster
How is the InnoDB Cluster now ?
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201712
MySQL InnoDB Cluster
•
Start MySQL Shell
•
Deploy Instance (s)
•
Create Cluster
•
Add more instances
Setup and start RouterSetup and start Router
bin/mysqlrouter --bootstrap localhost:bin/mysqlrouter --bootstrap localhost:
1310 --name OSIRouter1310 --name OSIRouter
Notice the
R/W, R ports
for MySQL
InnoDB
Cluster
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201713
MySQL InnoDB Cluster
MySQL Router
( layered on top of the MySQL Instances )
‘R’ Instance
Port :1311
‘R/W’ Instance
Port :1310
‘R’ Instance
Port :1312
Router is set and HA’d
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201714
MySQL InnoDB Cluster…on test
•
Start MySQL Shell
•
Deploy Instance (s)
•
Create Cluster
•
Add more instances
•
Setup and Start Router
Client connects to R/W InstanceClient connects to R/W Instance
andand
Kill R/W InstanceKill R/W Instance
Where do new client requests go to ???
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201715
MySQL InnoDB Cluster…on test
•
Start MySQL Shell
•
Deploy Instance (s)
•
Create Cluster
•
Add more instances
•
Setup and Start Router
•
Client Connects to R/W Instance
•
Kill R/W Instance
Client Requests handled by new R/W InstanClient Requests handled by new R/W Instan
How does the InnoDB Cluster look like
….now ???
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201716
MySQL InnoDB Cluster
MySQL Router
( layered on top of the MySQL Instances )
‘R/W’ Instance
Port :1311
‘R’ Instance
Port :1312
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Percona Live, Dublin, 27 September 201717
Introduction to Group Replication3
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201718
MySQL Group Replication
Traditional database
●
Many clients
●
One server
server
clients
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201719
MySQL Group Replication
server
A
server
B
server
C
clients
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201720
MySQL Group Replication
server
A
server
B
W WW
server
C
R RR R RR
clients
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201721
MySQL Group Replication
server
A
server
B
W RW
server
C
R W RW
clients
WR
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Limitations apply!
https://dev.mysql.com/doc/refman/8.0/en/group-replication-limitations.html
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201722
MySQL Group Replication
server
A
server
B
W RW
server
C
R W RW
clients
server
D
WR
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201723
MySQL Group Replication
server
A
server
B
W RW
server
C
WR R W RW
clients
server
D
server
E
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201724
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
server
D
server
E
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201725
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
server
D
server
E
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201726
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
server
E
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201727
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
server
E
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201728
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201729
8.0 Operations: Set Next Primary
BA C
W WW
SET group_replication_member_weight = [0-100]
Dw=25 w=20
R RR R RR R RR
w=10w=35
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201730
W WW
8.0 Operations: Set Next Primary
BA Cw=35 Dw=10 w=25 w=20
R RR R RR R RR
SET group_replication_member_weight = [0-100]
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201731
8.0 Operations: Set Next Primary
B C Dw=10 w=25 w=20
? ? ?
W WW R RR R RR R RR
SET group_replication_member_weight = [0-100]
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201732
SET group_replication_member_weight = [0-100]
8.0 Operations: Set Next Primary
B C Dw=10 w=25 w=20
? ? ?
W WW R RR R RR R RR
25 is the biggest
→ C is new primary
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201733
8.0 Operations: Set Next Primary
B C Dw=10 w=25 w=20
W WW R RR R RR R RR
SET group_replication_member_weight = [0-100]
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201734
8.0 Operations: No Writes After Leaving
Group
BA C D
W WW
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201735
8.0 Operations: No Writes After Leaving
Group
BA C D
Locally on A:
STOP GROUP REPLICATION
W WW
1. Disallow new writes
2. Wait for ongoing writes
3. Leave group
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201736
8.0 Operations: No Writes After Leaving
Group
BA C D
Locally on A:
STOP GROUP REPLICATION
W WW
1. Disallow new writes
2. Wait for ongoing writes
3. Leave group
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201737
W WW
8.0 Operations: No Writes After Leaving
Group
BA C D
Locally on A:
STOP GROUP REPLICATION
1. Disallow new writes
2. Wait for ongoing writes
3. Leave group
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201738
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
We are 3:
A, B, C!
We are 3:
A, B, C!
We are 3:
A, B, C!
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201739
MySQL Group Replication
server
A
server
B
W RW
server
C
R WR W RW
clients
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201740
MySQL Group Replication
server
A
server
B
W RW R WR W RW
clients
You and me:
A and B!
You and me:
A and B!
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201741
MySQL Group Replication
server
A
server
B
W RW R WR W RW
clients
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
B B
A A
All receive in
same order
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201742
MySQL Group Replication
server
A
server
B
W RW R WR W RW
clients
Group Replication
●
Many clients
●
Many servers
●
Read scalability
●
Write everywhere*
●
Elastic,
Highly available
●
Agreement on:
●
Members
●
Message delivery
●
State updates
Table
row 1
row 2
row 3
Queue
insert row 4
Table
row 1
row 2
Queue
insert row 3
insert row 4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201743
MySQL Group Replication
server
A
server
B
W RW WR
clients
Group Replication
●
Non conflicting
transactions are
certified positive.
●
For Conflicting
transactions first
committer wins
UPDATE t1
SET a=3
WHERE a=1
UPDATE t1
SET a=4
Where a=2
OK OK
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201744
MySQL Group Replication
server
A
server
B
W RW WR
clients
Group Replication
●
Non conflicting
transactions are
certified positive.
●
For Conflicting
transactions first
committer wins
UPDATE t1
SET a=3
WHERE a=1 UPDATE t1
SET a=4
Where a=1OK
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Percona Live, Dublin, 27 September 201745
Look and Feel of GR!4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201746
MySQL Group Replication
Group Replication
●
MySQL plugin
●
Uses InnoDB
●
Uses row format
●
Monitor using
performance schema
●
Full GTID support
●
Auto-increment
handling
●
Version access control
GR in 8 is gr8
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201747
MySQL Group Replication
Group Replication
●
MySQL plugin
●
Uses InnoDB
●
Monitor using
performance schema
●
●
Auto-increment
handling
●
Version access control
server
A
server
B
W RW WR
clients
INSERT x;
Will have
GTID:UUID:1
INSERT y;
Will have
GTID:UUID:2
Full GTID support
All group members share the same UUID, the
group name.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201748
MySQL Group Replication
Group Replication
●
MySQL plugin
●
Uses InnoDB
●
Monitor using
performance schema
●
Full GTID support
●
●
Version access control
server
A
server
B
W RW WR
INSERT x;
X:1
INSERT y;
Y:2
INSERT z;
Y:9
Auto-increment
handling
●
By default, the ofset is provided by
server_id and increment is 7.
●
Users can change the increment size using
group_replication_auto_increment_increment
option.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201749
MySQL Group Replication
Group Replication
●
MySQL plugin
●
Uses InnoDB
●
Monitor using
performance schema
●
Full GTID support
●
Auto-increment
handling
Version access control
MySQL
5.7.13
MySQL
5.7.14
W RW
MySQL
5.7.15
R WR W RW
Member with different patch version is allowed to
join the gorup.
MySQL
5.7.16
OK
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201750
MySQL Group Replication
Group Replication
●
MySQL plugin
●
Uses InnoDB
●
Monitor using
performance schema
●
Full GTID support
●
Auto-increment
handling
Version access control
MySQL
8.0
MySQL
8.0
W RW
MySQL
8.0
R WR W RW
Member with lower major version than the major
version in the group is not allowed to join group.
MySQL
5.7.16
No
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201751
MySQL Group Replication
Group Replication
●
MySQL plugin
●
Uses InnoDB
●
Monitor using
performance schema
●
Full GTID support
●
Auto-increment
handling
Version access control
MySQL
5.7.13
MySQL
5.7.14
W RW
MySQL
5.7.15
R WR W RW
Member with higher major version is allowed to
join but is not allowed to do writes. (Read only)
MySQL
8.0
OK
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201752
MySQL Async Replication
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201753
MySQL Async Replication
Example: Async replication between geo-distributed groups
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201754
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201755
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201756
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201757
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201758
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201759
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201760
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201761
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201762
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201763
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201764
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201765
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201766
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201767
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201768
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201769
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201770
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201771
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201772
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201773
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201774
Replication Architecture: Applier Pipeline
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201775
8.0 Performance: Applier Pipeline
 Parallelize reads and writes to relay log
 Performance for free
Replica
Relay
Log
Worker
Queues
Worker
Threads
Coordinator
Thread
Receiver
Thread
network
trx1
trx1
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Percona Live, Dublin, 27 September 201776
Monitoring5
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201777
8.0 Monitoring: Group Members
 Who are in this group?
– server_uuid, host, port, MySQL version
 Who is the primary?
 Online status of each node
mysql> SELECT … FROM performance_schema.replication_group_members
MEMBER_ID MEMBER_HOST MEMBER_PORT MEMBER_STATE MEMBER_ROLE MEMBER_VERSION
<uuid-A> murkla 3306 ONLINE PRIMARY 5.7.20
<uuid-B> kremla 3306 ONLINE SECONDARY 5.7.21
<uuid-C> kantarell 3306 UNREACHABLE SECONDARY 8.0.3
New in 8.0
B
5.7.21
A
5.7.20
C
8.0.3
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201778
8.0 Monitoring: Group Member Statistics
 Statistics used to diagnose group members
– Conflict ratio of the group
– Conflict ratio of each member (multi-primary)
– Is any member falling behind on certification or applying?
 Table performance_schema.replication_group_member_stats:
counts of transactions, by member:
– Positively/negatively certified transactions of any origin
– Positively/negatively certified transactions from the node
– Transactions waiting to be certified
– Certified transactions waiting to be applied
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201779
“I can’t w8 to replic8 with version 8”
 Evalu8
http://www.mysql.com/downloads/
 Educ8
Innodb cluster:
https://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-userguide.html
group replication:
http://dev.mysql.com/doc/refman/8.0/en/group-replication.html
 Contempl8
http://mysqlhighavailability.com
 Cooper8
https://bugs.mysql.com/
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201780
Thank You!& cu l8r, m8s
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. |81

More Related Content

What's hot

Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability MattersMatt Lord
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLOlivier DASINI
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)Mario Beck
 
MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!Vitor Oliveira
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMario Beck
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMatt Lord
 
Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8Olivier DASINI
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesSven Sandberg
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMario Beck
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...Olivier DASINI
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017Ivan Ma
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterOlivier DASINI
 
Upgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtimeUpgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtimeOlivier DASINI
 
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 High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability SolutionsLenz Grimmer
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1Ivan Ma
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMorgan Tocker
 
Group Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication CoreGroup Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication CoreAlfranio Júnior
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterContinuent
 
Sharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL FabricSharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL FabricMats Kindahl
 

What's hot (20)

Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability Matters
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
 
MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 
Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
 
Upgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtimeUpgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtime
 
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 High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep Dive
 
Group Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication CoreGroup Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication Core
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
 
Sharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL FabricSharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL Fabric
 

Viewers also liked

Inno db internals innodb file formats and source code structure
Inno db internals innodb file formats and source code structureInno db internals innodb file formats and source code structure
Inno db internals innodb file formats and source code structurezhaolinjnu
 
Мониторинг и отладка MySQL: максимум информации при минимальных потерях
Мониторинг и отладка MySQL: максимум информации при минимальных потеряхМониторинг и отладка MySQL: максимум информации при минимальных потерях
Мониторинг и отладка MySQL: максимум информации при минимальных потеряхSveta Smirnova
 
Mastering InnoDB Diagnostics
Mastering InnoDB DiagnosticsMastering InnoDB Diagnostics
Mastering InnoDB Diagnosticsguest8212a5
 
Using Apache Spark and MySQL for Data Analysis
Using Apache Spark and MySQL for Data AnalysisUsing Apache Spark and MySQL for Data Analysis
Using Apache Spark and MySQL for Data AnalysisSveta Smirnova
 
Mysql参数-GDB
Mysql参数-GDBMysql参数-GDB
Mysql参数-GDBzhaolinjnu
 
MySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourMySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourRonald Bradford
 
MySQL InnoDB 源码实现分析(一)
MySQL InnoDB 源码实现分析(一)MySQL InnoDB 源码实现分析(一)
MySQL InnoDB 源码实现分析(一)frogd
 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyMySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyContinuent
 
What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...Sveta Smirnova
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability Mydbops
 
A New Architecture for Group Replication in Data Grid
A New Architecture for Group Replication in Data GridA New Architecture for Group Replication in Data Grid
A New Architecture for Group Replication in Data GridEditor IJCATR
 
淘宝数据库架构演进历程
淘宝数据库架构演进历程淘宝数据库架构演进历程
淘宝数据库架构演进历程zhaolinjnu
 
Hbase源码初探
Hbase源码初探Hbase源码初探
Hbase源码初探zhaolinjnu
 
MySQL Storage Engines - which do you use? TokuDB? MyRocks? InnoDB?
MySQL Storage Engines - which do you use? TokuDB? MyRocks? InnoDB?MySQL Storage Engines - which do you use? TokuDB? MyRocks? InnoDB?
MySQL Storage Engines - which do you use? TokuDB? MyRocks? InnoDB?Sveta Smirnova
 
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationPercona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationKenny Gryp
 

Viewers also liked (20)

Inno db internals innodb file formats and source code structure
Inno db internals innodb file formats and source code structureInno db internals innodb file formats and source code structure
Inno db internals innodb file formats and source code structure
 
Мониторинг и отладка MySQL: максимум информации при минимальных потерях
Мониторинг и отладка MySQL: максимум информации при минимальных потеряхМониторинг и отладка MySQL: максимум информации при минимальных потерях
Мониторинг и отладка MySQL: максимум информации при минимальных потерях
 
Load Data Fast!
Load Data Fast!Load Data Fast!
Load Data Fast!
 
Mastering InnoDB Diagnostics
Mastering InnoDB DiagnosticsMastering InnoDB Diagnostics
Mastering InnoDB Diagnostics
 
Using Apache Spark and MySQL for Data Analysis
Using Apache Spark and MySQL for Data AnalysisUsing Apache Spark and MySQL for Data Analysis
Using Apache Spark and MySQL for Data Analysis
 
Mysql参数-GDB
Mysql参数-GDBMysql参数-GDB
Mysql参数-GDB
 
MySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourMySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD Tour
 
MySQL InnoDB 源码实现分析(一)
MySQL InnoDB 源码实现分析(一)MySQL InnoDB 源码实现分析(一)
MySQL InnoDB 源码实现分析(一)
 
Mysql For Developers
Mysql For DevelopersMysql For Developers
Mysql For Developers
 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyMySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
 
What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...
 
Redis介绍
Redis介绍Redis介绍
Redis介绍
 
Extensible Data Modeling
Extensible Data ModelingExtensible Data Modeling
Extensible Data Modeling
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
A New Architecture for Group Replication in Data Grid
A New Architecture for Group Replication in Data GridA New Architecture for Group Replication in Data Grid
A New Architecture for Group Replication in Data Grid
 
淘宝数据库架构演进历程
淘宝数据库架构演进历程淘宝数据库架构演进历程
淘宝数据库架构演进历程
 
Hbase源码初探
Hbase源码初探Hbase源码初探
Hbase源码初探
 
SQL Outer Joins for Fun and Profit
SQL Outer Joins for Fun and ProfitSQL Outer Joins for Fun and Profit
SQL Outer Joins for Fun and Profit
 
MySQL Storage Engines - which do you use? TokuDB? MyRocks? InnoDB?
MySQL Storage Engines - which do you use? TokuDB? MyRocks? InnoDB?MySQL Storage Engines - which do you use? TokuDB? MyRocks? InnoDB?
MySQL Storage Engines - which do you use? TokuDB? MyRocks? InnoDB?
 
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationPercona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
 

Similar to MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore

20191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv120191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv1Ivan Ma
 
Robust easy affordable disaster recovery for MySQL Data
Robust easy affordable disaster recovery for MySQL DataRobust easy affordable disaster recovery for MySQL Data
Robust easy affordable disaster recovery for MySQL DataOracleMySQL
 
MySQL Community Meetup in China : Innovation driven by the Community
MySQL Community Meetup in China : Innovation driven by the CommunityMySQL Community Meetup in China : Innovation driven by the Community
MySQL Community Meetup in China : Innovation driven by the CommunityFrederic Descamps
 
20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharingIvan Ma
 
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)OracleMySQL
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL Brasil
 
MySQL 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
 
MySQL Innovation: from 5.7 to 8.0
MySQL Innovation:  from 5.7 to 8.0MySQL Innovation:  from 5.7 to 8.0
MySQL Innovation: from 5.7 to 8.0Frederic Descamps
 
MySQL Innovation from 5.7 to 8.0
MySQL Innovation from 5.7 to 8.0MySQL Innovation from 5.7 to 8.0
MySQL Innovation from 5.7 to 8.0Frederic Descamps
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterFrederic Descamps
 
Develop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPIDevelop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPIDave Stokes
 
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisMySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisOlivier DASINI
 
Airbnb Runs on Amazon Aurora - DAT331 - re:Invent 2017
Airbnb Runs on Amazon Aurora - DAT331 - re:Invent 2017Airbnb Runs on Amazon Aurora - DAT331 - re:Invent 2017
Airbnb Runs on Amazon Aurora - DAT331 - re:Invent 2017Amazon Web Services
 
Cloud Native 자바 플랫폼: Graalvm Overview
Cloud Native 자바 플랫폼: Graalvm OverviewCloud Native 자바 플랫폼: Graalvm Overview
Cloud Native 자바 플랫폼: Graalvm OverviewOracle Korea
 
Trivadis TechEvent 2017 Oracle on azure by Michael Schwarzgorn
Trivadis TechEvent 2017 Oracle on azure by Michael SchwarzgornTrivadis TechEvent 2017 Oracle on azure by Michael Schwarzgorn
Trivadis TechEvent 2017 Oracle on azure by Michael SchwarzgornTrivadis
 
MySQL 8.0 in a nutshell
MySQL 8.0 in a nutshellMySQL 8.0 in a nutshell
MySQL 8.0 in a nutshellOracleMySQL
 
State ofdolphin short
State ofdolphin shortState ofdolphin short
State ofdolphin shortMandy Ang
 

Similar to MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore (20)

20191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv120191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv1
 
Robust easy affordable disaster recovery for MySQL Data
Robust easy affordable disaster recovery for MySQL DataRobust easy affordable disaster recovery for MySQL Data
Robust easy affordable disaster recovery for MySQL Data
 
MySQL Community Meetup in China : Innovation driven by the Community
MySQL Community Meetup in China : Innovation driven by the CommunityMySQL Community Meetup in China : Innovation driven by the Community
MySQL Community Meetup in China : Innovation driven by the Community
 
20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing
 
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
 
My sql8 innodb_cluster
My sql8 innodb_clusterMy sql8 innodb_cluster
My sql8 innodb_cluster
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e Uber
 
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
 
MySQL Innovation: from 5.7 to 8.0
MySQL Innovation:  from 5.7 to 8.0MySQL Innovation:  from 5.7 to 8.0
MySQL Innovation: from 5.7 to 8.0
 
MySQL Innovation from 5.7 to 8.0
MySQL Innovation from 5.7 to 8.0MySQL Innovation from 5.7 to 8.0
MySQL Innovation from 5.7 to 8.0
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
 
Develop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPIDevelop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPI
 
Kubernetes scheduling and QoS
Kubernetes scheduling and QoSKubernetes scheduling and QoS
Kubernetes scheduling and QoS
 
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisMySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
 
Airbnb Runs on Amazon Aurora - DAT331 - re:Invent 2017
Airbnb Runs on Amazon Aurora - DAT331 - re:Invent 2017Airbnb Runs on Amazon Aurora - DAT331 - re:Invent 2017
Airbnb Runs on Amazon Aurora - DAT331 - re:Invent 2017
 
Cloud Native Java:GraalVM
Cloud Native Java:GraalVMCloud Native Java:GraalVM
Cloud Native Java:GraalVM
 
Cloud Native 자바 플랫폼: Graalvm Overview
Cloud Native 자바 플랫폼: Graalvm OverviewCloud Native 자바 플랫폼: Graalvm Overview
Cloud Native 자바 플랫폼: Graalvm Overview
 
Trivadis TechEvent 2017 Oracle on azure by Michael Schwarzgorn
Trivadis TechEvent 2017 Oracle on azure by Michael SchwarzgornTrivadis TechEvent 2017 Oracle on azure by Michael Schwarzgorn
Trivadis TechEvent 2017 Oracle on azure by Michael Schwarzgorn
 
MySQL 8.0 in a nutshell
MySQL 8.0 in a nutshellMySQL 8.0 in a nutshell
MySQL 8.0 in a nutshell
 
State ofdolphin short
State ofdolphin shortState ofdolphin short
State ofdolphin short
 

Recently uploaded

How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 

Recently uploaded (20)

How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore

  • 1. MySQL InnoDB Cluster and Group Replication Madhusudhan G Joshi (madhusudhan.joshi@oracle.com) Software Development Manager Sujatha Sivakumar (sujatha.sivakumar@oracle.com) Principal Member Technical Staf
  • 2. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20172 Safe Harbour Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20173 Program Agenda Introduction to MySQL Innodb Cluster How to get it working Introduction to Group Replication Look and Feel of GR! Monitoring 1 2 3 4 5
  • 4. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20174 Introduction to MySQL Innodb Cluster1
  • 5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20175 InnoDB Cluster Integrated Solution ● Group Replication for high availability. ● Asynchronous Replication for Read Scale- out. ● One-stop shell to deploy and manage the cluster. ● Seamlessly and automatically route the workload to the proper database server in the cluster. ● Hide failures from the application. M M M MySQL Connector Application MySQL Router MySQL Connector Application MySQL Router MQL Shell HA S1 S2 S3 S4 S…
  • 6. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20176 How to get it working2
  • 7. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20177 MySQL InnoDB Cluster • Start MySQL Shell • Deploy Instance (s) • dba.deploySandboxInstance(....)
  • 8. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20178 MySQL InnoDB Cluster • Start MySQL Shell • Deploy Instance (s) • Initiate/Create ClusterInitiate/Create Cluster shell.connect("root@localhost:1310");shell.connect("root@localhost:1310"); cluster = dba.createCluster('OSIcluster');cluster = dba.createCluster('OSIcluster');
  • 9. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 20179 MySQL InnoDB Cluster few more moments …. Is the Cluster on and available ?
  • 10. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201710 MySQL InnoDB Cluster • Start MySQL Shell • Deploy Instance (s) • Create Cluster Add few more instancesAdd few more instances myOSI.addInstance("root@localhost:XXXX")myOSI.addInstance("root@localhost:XXXX")
  • 11. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201711 MySQL InnoDB Cluster How is the InnoDB Cluster now ?
  • 12. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201712 MySQL InnoDB Cluster • Start MySQL Shell • Deploy Instance (s) • Create Cluster • Add more instances Setup and start RouterSetup and start Router bin/mysqlrouter --bootstrap localhost:bin/mysqlrouter --bootstrap localhost: 1310 --name OSIRouter1310 --name OSIRouter Notice the R/W, R ports for MySQL InnoDB Cluster
  • 13. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201713 MySQL InnoDB Cluster MySQL Router ( layered on top of the MySQL Instances ) ‘R’ Instance Port :1311 ‘R/W’ Instance Port :1310 ‘R’ Instance Port :1312 Router is set and HA’d
  • 14. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201714 MySQL InnoDB Cluster…on test • Start MySQL Shell • Deploy Instance (s) • Create Cluster • Add more instances • Setup and Start Router Client connects to R/W InstanceClient connects to R/W Instance andand Kill R/W InstanceKill R/W Instance Where do new client requests go to ???
  • 15. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201715 MySQL InnoDB Cluster…on test • Start MySQL Shell • Deploy Instance (s) • Create Cluster • Add more instances • Setup and Start Router • Client Connects to R/W Instance • Kill R/W Instance Client Requests handled by new R/W InstanClient Requests handled by new R/W Instan How does the InnoDB Cluster look like ….now ???
  • 16. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201716 MySQL InnoDB Cluster MySQL Router ( layered on top of the MySQL Instances ) ‘R/W’ Instance Port :1311 ‘R’ Instance Port :1312
  • 17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Percona Live, Dublin, 27 September 201717 Introduction to Group Replication3
  • 18. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201718 MySQL Group Replication Traditional database ● Many clients ● One server server clients
  • 19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201719 MySQL Group Replication server A server B server C clients Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 20. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201720 MySQL Group Replication server A server B W WW server C R RR R RR clients Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201721 MySQL Group Replication server A server B W RW server C R W RW clients WR Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates Limitations apply! https://dev.mysql.com/doc/refman/8.0/en/group-replication-limitations.html
  • 22. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201722 MySQL Group Replication server A server B W RW server C R W RW clients server D WR Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 23. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201723 MySQL Group Replication server A server B W RW server C WR R W RW clients server D server E Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 24. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201724 MySQL Group Replication server A server B W RW server C R WR W RW clients server D server E Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 25. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201725 MySQL Group Replication server A server B W RW server C R WR W RW clients server D server E Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 26. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201726 MySQL Group Replication server A server B W RW server C R WR W RW clients server E Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 27. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201727 MySQL Group Replication server A server B W RW server C R WR W RW clients server E Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 28. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201728 MySQL Group Replication server A server B W RW server C R WR W RW clients Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 29. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201729 8.0 Operations: Set Next Primary BA C W WW SET group_replication_member_weight = [0-100] Dw=25 w=20 R RR R RR R RR w=10w=35
  • 30. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201730 W WW 8.0 Operations: Set Next Primary BA Cw=35 Dw=10 w=25 w=20 R RR R RR R RR SET group_replication_member_weight = [0-100]
  • 31. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201731 8.0 Operations: Set Next Primary B C Dw=10 w=25 w=20 ? ? ? W WW R RR R RR R RR SET group_replication_member_weight = [0-100]
  • 32. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201732 SET group_replication_member_weight = [0-100] 8.0 Operations: Set Next Primary B C Dw=10 w=25 w=20 ? ? ? W WW R RR R RR R RR 25 is the biggest → C is new primary
  • 33. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201733 8.0 Operations: Set Next Primary B C Dw=10 w=25 w=20 W WW R RR R RR R RR SET group_replication_member_weight = [0-100]
  • 34. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201734 8.0 Operations: No Writes After Leaving Group BA C D W WW
  • 35. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201735 8.0 Operations: No Writes After Leaving Group BA C D Locally on A: STOP GROUP REPLICATION W WW 1. Disallow new writes 2. Wait for ongoing writes 3. Leave group
  • 36. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201736 8.0 Operations: No Writes After Leaving Group BA C D Locally on A: STOP GROUP REPLICATION W WW 1. Disallow new writes 2. Wait for ongoing writes 3. Leave group
  • 37. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201737 W WW 8.0 Operations: No Writes After Leaving Group BA C D Locally on A: STOP GROUP REPLICATION 1. Disallow new writes 2. Wait for ongoing writes 3. Leave group
  • 38. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201738 MySQL Group Replication server A server B W RW server C R WR W RW clients We are 3: A, B, C! We are 3: A, B, C! We are 3: A, B, C! Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 39. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201739 MySQL Group Replication server A server B W RW server C R WR W RW clients Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 40. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201740 MySQL Group Replication server A server B W RW R WR W RW clients You and me: A and B! You and me: A and B! Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates
  • 41. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201741 MySQL Group Replication server A server B W RW R WR W RW clients Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates B B A A All receive in same order
  • 42. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201742 MySQL Group Replication server A server B W RW R WR W RW clients Group Replication ● Many clients ● Many servers ● Read scalability ● Write everywhere* ● Elastic, Highly available ● Agreement on: ● Members ● Message delivery ● State updates Table row 1 row 2 row 3 Queue insert row 4 Table row 1 row 2 Queue insert row 3 insert row 4
  • 43. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201743 MySQL Group Replication server A server B W RW WR clients Group Replication ● Non conflicting transactions are certified positive. ● For Conflicting transactions first committer wins UPDATE t1 SET a=3 WHERE a=1 UPDATE t1 SET a=4 Where a=2 OK OK
  • 44. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201744 MySQL Group Replication server A server B W RW WR clients Group Replication ● Non conflicting transactions are certified positive. ● For Conflicting transactions first committer wins UPDATE t1 SET a=3 WHERE a=1 UPDATE t1 SET a=4 Where a=1OK
  • 45. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Percona Live, Dublin, 27 September 201745 Look and Feel of GR!4
  • 46. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201746 MySQL Group Replication Group Replication ● MySQL plugin ● Uses InnoDB ● Uses row format ● Monitor using performance schema ● Full GTID support ● Auto-increment handling ● Version access control GR in 8 is gr8
  • 47. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201747 MySQL Group Replication Group Replication ● MySQL plugin ● Uses InnoDB ● Monitor using performance schema ● ● Auto-increment handling ● Version access control server A server B W RW WR clients INSERT x; Will have GTID:UUID:1 INSERT y; Will have GTID:UUID:2 Full GTID support All group members share the same UUID, the group name.
  • 48. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201748 MySQL Group Replication Group Replication ● MySQL plugin ● Uses InnoDB ● Monitor using performance schema ● Full GTID support ● ● Version access control server A server B W RW WR INSERT x; X:1 INSERT y; Y:2 INSERT z; Y:9 Auto-increment handling ● By default, the ofset is provided by server_id and increment is 7. ● Users can change the increment size using group_replication_auto_increment_increment option.
  • 49. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201749 MySQL Group Replication Group Replication ● MySQL plugin ● Uses InnoDB ● Monitor using performance schema ● Full GTID support ● Auto-increment handling Version access control MySQL 5.7.13 MySQL 5.7.14 W RW MySQL 5.7.15 R WR W RW Member with different patch version is allowed to join the gorup. MySQL 5.7.16 OK
  • 50. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201750 MySQL Group Replication Group Replication ● MySQL plugin ● Uses InnoDB ● Monitor using performance schema ● Full GTID support ● Auto-increment handling Version access control MySQL 8.0 MySQL 8.0 W RW MySQL 8.0 R WR W RW Member with lower major version than the major version in the group is not allowed to join group. MySQL 5.7.16 No
  • 51. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201751 MySQL Group Replication Group Replication ● MySQL plugin ● Uses InnoDB ● Monitor using performance schema ● Full GTID support ● Auto-increment handling Version access control MySQL 5.7.13 MySQL 5.7.14 W RW MySQL 5.7.15 R WR W RW Member with higher major version is allowed to join but is not allowed to do writes. (Read only) MySQL 8.0 OK
  • 52. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201752 MySQL Async Replication
  • 53. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201753 MySQL Async Replication Example: Async replication between geo-distributed groups
  • 54. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201754 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 55. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201755 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 56. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201756 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 57. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201757 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 58. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201758 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 59. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201759 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 60. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201760 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 61. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201761 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 62. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201762 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 63. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201763 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 64. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201764 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 65. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201765 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 66. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201766 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 67. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201767 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 68. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201768 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 69. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201769 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 70. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201770 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 71. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201771 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 72. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201772 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 73. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201773 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 74. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201774 Replication Architecture: Applier Pipeline Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network
  • 75. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201775 8.0 Performance: Applier Pipeline  Parallelize reads and writes to relay log  Performance for free Replica Relay Log Worker Queues Worker Threads Coordinator Thread Receiver Thread network trx1 trx1
  • 76. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Percona Live, Dublin, 27 September 201776 Monitoring5
  • 77. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201777 8.0 Monitoring: Group Members  Who are in this group? – server_uuid, host, port, MySQL version  Who is the primary?  Online status of each node mysql> SELECT … FROM performance_schema.replication_group_members MEMBER_ID MEMBER_HOST MEMBER_PORT MEMBER_STATE MEMBER_ROLE MEMBER_VERSION <uuid-A> murkla 3306 ONLINE PRIMARY 5.7.20 <uuid-B> kremla 3306 ONLINE SECONDARY 5.7.21 <uuid-C> kantarell 3306 UNREACHABLE SECONDARY 8.0.3 New in 8.0 B 5.7.21 A 5.7.20 C 8.0.3
  • 78. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201778 8.0 Monitoring: Group Member Statistics  Statistics used to diagnose group members – Conflict ratio of the group – Conflict ratio of each member (multi-primary) – Is any member falling behind on certification or applying?  Table performance_schema.replication_group_member_stats: counts of transactions, by member: – Positively/negatively certified transactions of any origin – Positively/negatively certified transactions from the node – Transactions waiting to be certified – Certified transactions waiting to be applied
  • 79. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201779 “I can’t w8 to replic8 with version 8”  Evalu8 http://www.mysql.com/downloads/  Educ8 Innodb cluster: https://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-userguide.html group replication: http://dev.mysql.com/doc/refman/8.0/en/group-replication.html  Contempl8 http://mysqlhighavailability.com  Cooper8 https://bugs.mysql.com/
  • 80. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | OSI, Bangalore, 13 October 201780 Thank You!& cu l8r, m8s
  • 81. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. |81