SlideShare a Scribd company logo
1 of 62
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |Tuesday, September 22, 2015 Percona Live - Amsterdam
State of MySQL Group Replication
Nuno Carvalho (nuno.carvalho@oracle.com)
Principal Software Engineer, MySQL Replication Service Team Lead
1
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
Tuesday, September 22, 2015 Percona Live - Amsterdam 2
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Tuesday, September 22, 2015 Percona Live - Amsterdam
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Background
MySQL Group Replication
Architecture
Use cases
Conclusion
1
2
3
4
5
Tuesday, September 22, 2015 Percona Live - Amsterdam 4
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Background1
Tuesday, September 22, 2015 Percona Live - Amsterdam
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
M S
S
S
S
M
write clients read clients
read clients
write clients
More
reads?
More
slaves!
Read scale-out
Background: What is Replication Used For?
Tuesday, September 22, 2015 Percona Live - Amsterdam 6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
C
B
A
C
B
ACrash
C
B
A
B is the
new master
Uh Oh! Whew!
Redundancy: If master crashes, promote slave to master
Background: What is Replication Used For?
Tuesday, September 22, 2015 Percona Live - Amsterdam 7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication
• What is MySQL Group Replication?
“Multi-master update everywhere replication plugin for MySQL with built-in automatic
distributed recovery, conflict detection and group membership.”
• What does the MySQL Group Replication plugin do for the user?
– Removes the need for handling server fail-over.
– Provides fault tolerance.
– Enables update everywhere setups.
– Automates group reconfiguration (handling of crashes, failures, re-connects).
– Provides a highly available replicated database.
Tuesday, September 22, 2015 Percona Live - Amsterdam 8
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication
Tuesday, September 22, 2015 Percona Live - Amsterdam 9
M M M M M
Replication Group
Clients
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Strong development cycles and continuous community engagement
through regular lab releases.
MySQL Group Replication
Tuesday, September 22, 2015 Percona Live - Amsterdam 10
2014-Sep-29
Labs release: 0.2.0
2015-Apr-06
Labs release: 0.3.0
2014-Aug-06
Labs release: 0.4.0
2015-Sep-14
Labs release: 0.5.0
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Strong development cycles and continuous community engagement
through regular lab releases.
MySQL Group Replication
Tuesday, September 22, 2015 Percona Live - Amsterdam 11
2014-Sep-29
Labs release: 0.2.0
2015-Apr-06
Labs release: 0.3.0
2014-Aug-06
Labs release: 0.4.0
2015-Sep-14
Labs release: 0.5.0
Introduces standalone plugin,
with its own release cycle!
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication2
Tuesday, September 22, 2015
2.1
Percona Live - Amsterdam
Multi-Master
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Multi-Master update everywhere!
• Any two transactions on different servers can write to the same tuple.
• Conflicts will be detected and dealt with (first committer wins rule).
Tuesday, September 22, 2015 Percona Live - Amsterdam 13
M M M M M
UPDATE t1 SET a=2 WHERE a=1UPDATE t1 SET a=3 WHERE a=1
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Multi-Master update everywhere!
• Any two transactions on different servers can write to the same tuple.
• Conflicts will be detected and dealt with (first committer wins rule).
Tuesday, September 22, 2015 Percona Live - Amsterdam 14
M M M M M
UPDATE t1 SET a=2 WHERE a=1UPDATE t1 SET a=3 WHERE a=1
OK
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Multi-Master update everywhere!
• Any two transactions on different servers can write to the same tuple.
• Conflicts will be detected and dealt with (first committer wins rule).
Tuesday, September 22, 2015 Percona Live - Amsterdam 15
M M M M M
UPDATE t1 SET a=4 WHERE a=2UPDATE t1 SET a=3 WHERE a=1
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Multi-Master update everywhere!
• Any two transactions on different servers can write to the same tuple.
• Conflicts will be detected and dealt with (first committer wins rule).
Tuesday, September 22, 2015 Percona Live - Amsterdam 16
M M M M M
UPDATE t1 SET a=4 WHERE a=2UPDATE t1 SET a=3 WHERE a=1
OKOK
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication2
Tuesday, September 22, 2015
2.1
2.2
Percona Live - Amsterdam
Multi-Master
Automatic distributed server recovery
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Automatic distributed server recovery!
• Server that joins the group will automatically synchronize with the others.
Tuesday, September 22, 2015 Percona Live - Amsterdam 18
M M M M M N
I want to play with you
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Automatic distributed server recovery!
• Server that joins the group will automatically synchronize with the others.
Tuesday, September 22, 2015 Percona Live - Amsterdam 19
M M M M M N
ONLINE
RECOVERING
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Automatic distributed server recovery!
• Server that joins the group will automatically synchronize with the others.
Tuesday, September 22, 2015 Percona Live - Amsterdam 20
M M M M M N
ONLINE
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Automatic distributed server recovery!
• If a server leaves the group, the others will automatically be informed.
Tuesday, September 22, 2015 Percona Live - Amsterdam 21
M M M M M N
My machine needs maintenance
or a system crash happens
Each membership configuration
is identified by a view_id
view_id: 4
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Automatic distributed server recovery!
• If a server leaves the group, the others will automatically be informed.
Tuesday, September 22, 2015 Percona Live - Amsterdam 22
M M M M N
view_id: 5
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Automatic distributed server recovery!
• Server that (re)joins the group will automatically synchronize with the
others.
Tuesday, September 22, 2015 Percona Live - Amsterdam 23
M M M M M N
RECOVERING -> ONLINE
view_id: 6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication2
Tuesday, September 22, 2015
2.1
2.2
2.3
Percona Live - Amsterdam
Multi-Master
Automatic distributed server recovery
MySQL/InnoDB look & feel
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL/InnoDB look & feel!
• Load the plugin and start replicating.
• Monitor group replication stats though Performance Schema tables.
Tuesday, September 22, 2015 Percona Live - Amsterdam 25
mysql> SET GLOBAL group_replication_group_name= "9eb07c6d-5e24-11e5-854b-34028662c0cd";
mysql> START GROUP_REPLICATION;
mysql> SELECT * FROM performance_schema.replication_group_membersG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
MEMBER_ID: 597dbb72-3e2c-11e4-9d9d-ecf4bb227f3b
MEMBER_HOST: nightfury
MEMBER_PORT: 13000
MEMBER_STATE: ONLINE
*************************** 2. row ***************************
...
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL/InnoDB look & feel!
• Load the plugin and start replicating.
• Monitor group replication stats though Performance Schema tables.
Tuesday, September 22, 2015 Percona Live - Amsterdam 26
mysql> SELECT * FROM performance_schema.replication_group_member_statsG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
VIEW_ID: 1428497631:3
MEMBER_ID: e38fdea8-dded-11e4-b211-e8b1fc3848de
COUNT_TRANSACTIONS_IN_QUEUE: 0
COUNT_TRANSACTIONS_CHECKED: 12
COUNT_CONFLICTS_DETECTED: 5
COUNT_TRANSACTIONS_VALIDATING: 6
TRANSACTIONS_COMMITTED_ALL_MEMBERS: 8a84f397-aaa4-18df-89ab-c70aa9823561:1-7
LAST_CONFLICT_FREE_TRANSACTION: 8a84f397-aaa4-18df-89ab-c70aa9823561:7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL/InnoDB look & feel!
• Load the plugin and start replicating.
• Monitor group replication stats though Performance Schema tables.
Tuesday, September 22, 2015 Percona Live - Amsterdam 27
mysql> SELECT * FROM performance_schema.replication_connection_statusG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
GROUP_NAME: 8a94f357-aab4-11df-86ab-c80aa9429563
SOURCE_UUID: 8a94f357-aab4-11df-86ab-c80aa9429563
THREAD_ID: NULL
SERVICE_STATE: ON
...
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication2
Tuesday, September 22, 2015
2.1
2.2
2.3
2.4
Percona Live - Amsterdam
Multi-Master
Automatic distributed server recovery
MySQL/InnoDB look & feel
Full GTID support
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Full GTID support!
• All group members share the same UUID, the group name.
Tuesday, September 22, 2015 Percona Live - Amsterdam 29
M M M M M
INSERT y;
Will have GTID: group_name:2
INSERT x;
Will have GTID: group_name:1
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Full GTID support!
• Users can specify the identifier for the transaction.
Tuesday, September 22, 2015 Percona Live - Amsterdam 30
M M M M M
INSERT y;
Will have GTID: group_name:1
SET GTID_NEXT= “UUID:50”
INSERT x;
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Full GTID support!
• You can even replicate from a outside server to a group, global identifiers
will be preserved.
Tuesday, September 22, 2015 Percona Live - Amsterdam 31
M M M M M
Conflicts will be detected!
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication2
Tuesday, September 22, 2015
2.1
2.2
2.3
2.4
2.5
Percona Live - Amsterdam
Multi-Master
Automatic distributed server recovery
MySQL/InnoDB look & feel
Auto-increment configuration/handling
Full GTID support
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Auto-increment configuration/handling
• Group is configured not to generate the same auto-increment value on all
members.
Tuesday, September 22, 2015 Percona Live - Amsterdam 33
M M M M M
INSERT y;
y: 4
INSERT z;
z: 11
INSERT x;
x: 1
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Auto-increment configuration/handling
• By default, the offset is provided by server_id and increment is 7 [1].
Tuesday, September 22, 2015 Percona Live - Amsterdam 34
M M M M M
INSERT y;
y: 4
INSERT z;
z: 11
INSERT x;
x: 1
[1]: http://mysqlhighavailability.com/mysql-group-replication-auto-increment-configuration-handling/
server_id: 1
server_id: 4
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Auto-increment configuration/handling
• Users can change the increment size to their needs using
GROUP_REPLICATION_AUTO_INCREMENT_INCREMENT option.
Tuesday, September 22, 2015 Percona Live - Amsterdam 35
M M M M M
INSERT y;
y: 4
INSERT z;
z: 11
INSERT x;
x: 1
server_id: 1
server_id: 4
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Plugin version access control
MySQL Group Replication2
Tuesday, September 22, 2015
2.1
2.2
2.3
2.4
2.5
Percona Live - Amsterdam
2.6
Multi-Master
Automatic distributed server recovery
MySQL/InnoDB look & feel
Auto-increment configuration/handling
Full GTID support
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Plugin Version Access Control
• When joining, versions are crucial when determining if a member is
compatible with a group.
Tuesday, September 22, 2015 Percona Live - Amsterdam 37
0.4.1 0.4.2 0.4.2 0.4.3 0.4.0
Member with lower patch
version is allowed to join
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Plugin Version Access Control
• When joining, versions are crucial when determining if a member is
compatible with a group.
Tuesday, September 22, 2015 Percona Live - Amsterdam 38
0.4.0 0.4.2 0.5.0 0.5.1 0.4.0
Member with lower minor version
than the maximum minor version in
the group is not allowed to join
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Plugin Version Access Control
• When joining, versions are crucial when determining if a member is
compatible with a group.
Tuesday, September 22, 2015 Percona Live - Amsterdam 39
0.4.0 0.4.0 0.4.1 0.4.2 0.5.0
Member with higher minor
version is allowed to join
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Requirements
Plugin version access control
MySQL Group Replication2
Tuesday, September 22, 2015
2.1
2.2
2.3
2.4
2.5
Percona Live - Amsterdam
2.6
2.7
Multi-Master
Automatic distributed server recovery
MySQL/InnoDB look & feel
Auto-increment configuration/handling
Full GTID support
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Requirements (by design)
• Only supports InnoDB.
• Primary key is required on every table.
• Requires global transaction identifiers turned on.
• Optimistic execution: transactions may abort on COMMIT due to conflicts
with concurrent transactions on other members.
Tuesday, September 22, 2015 Percona Live - Amsterdam 41
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Requirements
Plugin version access control
MySQL Group Replication2
Tuesday, September 22, 2015
2.1
2.2
2.3
2.4
2.5
Percona Live - Amsterdam
2.6
2.7
Multi-Master
Automatic distributed server recovery
MySQL/InnoDB look & feel
Auto-increment configuration/handling
2.8
Full GTID support
Limitations
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Limitations
• Concurrent DDL is not supported.
• Limited transaction payload size.
Tuesday, September 22, 2015 Percona Live - Amsterdam 43
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Architecture
Introduction
3
Tuesday, September 22, 2015
3.1
Percona Live - Amsterdam
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication is
• Built on top of proven technology!
– Shares many of MySQL Replication.
– Multi-Master approach to replication.
• Built on reusable components!
– Layered implementation approach.
– Interface driven development.
– Decoupled from the server core.
– The plugin registers as listener to server events.
– Reuses the capture procedure from regular replication.
– Provides further decoupling from the communication infrasctructure.
Tuesday, September 22, 2015 Percona Live - Amsterdam 45
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Major Building Blocks
Architecture
Introduction
3
Tuesday, September 22, 2015
3.1
3.2
Percona Live - Amsterdam
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Major Building Blocks (1)
Tuesday, September 22, 2015 Percona Live - Amsterdam 47
M M M M M
Com. API
Replication
Plugin
API
MySQL
Server
Group Comm.
System (Corosync)
Group Comm.
System (Corosync)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Major Building Blocks (2)
• Server calls into the plugin through a generic
interface
– (Most of server) internals are hidden from the plugin.
– Some of the semi-sync interfaces were reused. Others
were deployed.
• 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.
Tuesday, September 22, 2015 Percona Live - Amsterdam 48
Com. API
Replication
Plugin
API
MySQL
Server
Group Comm.
System (Corosync)
Group Comm.
System (Corosync)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Major Building Blocks (3)
• The plugin is responsible for
– Maintaining distributed execution context.
– Detecting conflicts.
– Handling distributed recovery:
• Detect membership changes;
• Donate state if needed;
• Collect state if needed.
– Receiving and handling transactions from other
members.
– Deciding the fate of on-going transactions.
Tuesday, September 22, 2015 Percona Live - Amsterdam 49
Com. API
Replication
Plugin
API
MySQL
Server
Group Comm.
System (Corosync)
Group Comm.
System (Corosync)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Major Building Blocks (4)
• The communication API (and bindings) is
responsible for:
– Abstracting the underlaying communication system
from the plugin itself.
– Maping the interface to a specific communication
toolkit:
• Currently, MySQL Group Replication uses Corosync as the
underlying group communication system.
Tuesday, September 22, 2015 Percona Live - Amsterdam 50
Com. API
Replication
Plugin
API
MySQL
Server
Group Comm.
System (Corosync)
Group Comm.
System (Corosync)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The Complete Stack
Major Building Blocks
Architecture
Introduction
3
Tuesday, September 22, 2015
3.1
3.2
3.3
Percona Live - Amsterdam
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The Complete Stack
Tuesday, September 22, 2015 Percona Live - Amsterdam 52
API
Replication
Plugin
API
MySQL
Server
Performance Schema Tables: Monitoring
MySQL
APIs: Lifecycle / Capture / Applier
InnoDB
Replication Protocol
Group Comm. API
Corosync
Network
Plugin
Capture Applier
Conflicts
Handler
Group Comm.
System (Corosync)
Group Comm.
System (Corosync)
Group Comm. Binding
Recovery
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Use cases
Use cases
4
Tuesday, September 22, 2015
4.1
Percona Live - Amsterdam
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Use Cases
• Elastic Replication
– Environments that require a very fluid replication infrastructure, where the number
of servers has to grow or shrink dynamically and with as little pain as possible.
• Highly Available Shards
– Sharding is a popular approach to achieve write scale-out. Users can use MySQL
Group Replication to implement highly available shards. Each shard can map into a
Replication Group.
• Alternative to Master-Slave replication
– It may be that a single master server makes it a single point of contention. Writing to
an entire group may prove more scalable under certain circumstances.
Tuesday, September 22, 2015 Percona Live - Amsterdam 54
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Router
Use cases
Use cases
4
Tuesday, September 22, 2015
4.1
4.2
Percona Live - Amsterdam
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Router
• Motivation
– The need for transparent integration with Fabric.
• No need to upgrade existing connectors.
• Use Fabric with connectors that do not support it (e.g.,
Ruby, Perl, C).
– The need for read-write and read-only automatic
routing.
• Do not need to know which server is the master.
• Transparent fail-over support for a new master.
• End Result
– Generic and versatile framework: MySQL Router.
Tuesday, September 22, 2015 Percona Live - Amsterdam
NEW
M
Router
App
M M
Fabric
56
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Router
• Highlights
– High Performance
– Plugin Driven Architecture
– Simple to setup, configure and deploy.
• Features
– Simple Load balancing
– Seamless fail-over based on Fabric HA Groups
– Basic support for minimizing transaction conflicts
when deployed together with multi-master mode
on Group Replication.
Tuesday, September 22, 2015 Percona Live - Amsterdam
M
Router
App
M M
Fabric
NEW
57
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Server/Shard State &
Mapping
MySQL Scaling (HA + Sharding)
MySQL Fabric
Controller
HA Group
Coordination
and Control
58
MySQL
Router
Tuesday, September 22, 2015 Percona Live - Amsterdam
M M M
Shard 1
HA Group
M M M
Shard 2
HA Group
M M M
Shard N
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Conclusion5
Tuesday, September 22, 2015 Percona Live - Amsterdam
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Summary
• Cloud Friendly
– Great techonology for deployments where elasticity is a requirement, such as cloud
based infrastructures.
• Integrated
– With server core through a well defined API.
– With GTIDs, row based replication, performance schema tables.
• Autonomic and Operations Friendly
– It is self-healing: no admin overhead for handling server fail-overs.
– Provides fault-tolerance, enables multi-master update everywhere and a dependable
MySQL service.
• Lab releases provide a sneak peek at what is coming - a new replication plugin and
exciting new infrastructure: MySQL Group Replication and MySQL Router.
Tuesday, September 22, 2015 Percona Live - Amsterdam 60
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Where to go from here?
• Packages
– http://labs.mysql.com
• Blogs from the Engineers (news, technical information, and much more)
– http://mysqlhighavailability.com
Tuesday, September 22, 2015 Percona Live - Amsterdam 61
State of MySQL Group Replication - Percona Live Europe 2015

More Related Content

Viewers also liked

Treasure Data and AWS - Developers.io 2015
Treasure Data and AWS - Developers.io 2015Treasure Data and AWS - Developers.io 2015
Treasure Data and AWS - Developers.io 2015N Masahiro
 
MySQL High Availability with Replication New Features
MySQL High Availability with Replication New FeaturesMySQL High Availability with Replication New Features
MySQL High Availability with Replication New FeaturesShivji Kumar Jha
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group ReplicationBogdan Kecman
 
FOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group ReplicationFOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group ReplicationShivji Kumar Jha
 
Advanced mysql replication techniques
Advanced mysql replication techniquesAdvanced mysql replication techniques
Advanced mysql replication techniquesGiuseppe Maxia
 
High-Availability using MySQL Fabric
High-Availability using MySQL FabricHigh-Availability using MySQL Fabric
High-Availability using MySQL FabricMats Kindahl
 
MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQL InnoDB Cluster 미리보기 (remote cluster test)MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQL InnoDB Cluster 미리보기 (remote cluster test)Seungmin Yu
 
Haute disponibilité my sql avec group réplication
Haute disponibilité my sql avec group réplicationHaute disponibilité my sql avec group réplication
Haute disponibilité my sql avec group réplicationFrederic Descamps
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationNuno Carvalho
 
Group Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication CoreGroup Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication CoreAlfranio Júnior
 
MySQL 5.7 Fabric: Introduction to High Availability and Sharding
MySQL 5.7 Fabric: Introduction to High Availability and Sharding MySQL 5.7 Fabric: Introduction to High Availability and Sharding
MySQL 5.7 Fabric: Introduction to High Availability and Sharding Ulf Wendel
 
MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017Dave Stokes
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group ReplicationUlf Wendel
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMatt Lord
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarAndrew Morgan
 
Multi Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ VerisureMulti Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ VerisureKenny Gryp
 

Viewers also liked (17)

Treasure Data and AWS - Developers.io 2015
Treasure Data and AWS - Developers.io 2015Treasure Data and AWS - Developers.io 2015
Treasure Data and AWS - Developers.io 2015
 
MySQL High Availability with Replication New Features
MySQL High Availability with Replication New FeaturesMySQL High Availability with Replication New Features
MySQL High Availability with Replication New Features
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
FOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group ReplicationFOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group Replication
 
Advanced mysql replication techniques
Advanced mysql replication techniquesAdvanced mysql replication techniques
Advanced mysql replication techniques
 
High-Availability using MySQL Fabric
High-Availability using MySQL FabricHigh-Availability using MySQL Fabric
High-Availability using MySQL Fabric
 
MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQL InnoDB Cluster 미리보기 (remote cluster test)MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQL InnoDB Cluster 미리보기 (remote cluster test)
 
Haute disponibilité my sql avec group réplication
Haute disponibilité my sql avec group réplicationHaute disponibilité my sql avec group réplication
Haute disponibilité my sql avec group réplication
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group Replication
 
Group Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication CoreGroup Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication Core
 
MySQL 5.7 Fabric: Introduction to High Availability and Sharding
MySQL 5.7 Fabric: Introduction to High Availability and Sharding MySQL 5.7 Fabric: Introduction to High Availability and Sharding
MySQL 5.7 Fabric: Introduction to High Availability and Sharding
 
MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 
MySQL Cluster Basics
MySQL Cluster BasicsMySQL Cluster Basics
MySQL Cluster Basics
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinar
 
Multi Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ VerisureMulti Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ Verisure
 

Recently uploaded

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.
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 

Recently uploaded (20)

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 ...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 

State of MySQL Group Replication - Percona Live Europe 2015

  • 1. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |Tuesday, September 22, 2015 Percona Live - Amsterdam State of MySQL Group Replication Nuno Carvalho (nuno.carvalho@oracle.com) Principal Software Engineer, MySQL Replication Service Team Lead 1
  • 2. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Tuesday, September 22, 2015 Percona Live - Amsterdam 2
  • 3. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Tuesday, September 22, 2015 Percona Live - Amsterdam
  • 4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Background MySQL Group Replication Architecture Use cases Conclusion 1 2 3 4 5 Tuesday, September 22, 2015 Percona Live - Amsterdam 4
  • 5. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Background1 Tuesday, September 22, 2015 Percona Live - Amsterdam
  • 6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | M S S S S M write clients read clients read clients write clients More reads? More slaves! Read scale-out Background: What is Replication Used For? Tuesday, September 22, 2015 Percona Live - Amsterdam 6
  • 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | C B A C B ACrash C B A B is the new master Uh Oh! Whew! Redundancy: If master crashes, promote slave to master Background: What is Replication Used For? Tuesday, September 22, 2015 Percona Live - Amsterdam 7
  • 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication • What is MySQL Group Replication? “Multi-master update everywhere replication plugin for MySQL with built-in automatic distributed recovery, conflict detection and group membership.” • What does the MySQL Group Replication plugin do for the user? – Removes the need for handling server fail-over. – Provides fault tolerance. – Enables update everywhere setups. – Automates group reconfiguration (handling of crashes, failures, re-connects). – Provides a highly available replicated database. Tuesday, September 22, 2015 Percona Live - Amsterdam 8
  • 9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication Tuesday, September 22, 2015 Percona Live - Amsterdam 9 M M M M M Replication Group Clients
  • 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Strong development cycles and continuous community engagement through regular lab releases. MySQL Group Replication Tuesday, September 22, 2015 Percona Live - Amsterdam 10 2014-Sep-29 Labs release: 0.2.0 2015-Apr-06 Labs release: 0.3.0 2014-Aug-06 Labs release: 0.4.0 2015-Sep-14 Labs release: 0.5.0
  • 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Strong development cycles and continuous community engagement through regular lab releases. MySQL Group Replication Tuesday, September 22, 2015 Percona Live - Amsterdam 11 2014-Sep-29 Labs release: 0.2.0 2015-Apr-06 Labs release: 0.3.0 2014-Aug-06 Labs release: 0.4.0 2015-Sep-14 Labs release: 0.5.0 Introduces standalone plugin, with its own release cycle!
  • 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication2 Tuesday, September 22, 2015 2.1 Percona Live - Amsterdam Multi-Master
  • 13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Multi-Master update everywhere! • Any two transactions on different servers can write to the same tuple. • Conflicts will be detected and dealt with (first committer wins rule). Tuesday, September 22, 2015 Percona Live - Amsterdam 13 M M M M M UPDATE t1 SET a=2 WHERE a=1UPDATE t1 SET a=3 WHERE a=1
  • 14. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Multi-Master update everywhere! • Any two transactions on different servers can write to the same tuple. • Conflicts will be detected and dealt with (first committer wins rule). Tuesday, September 22, 2015 Percona Live - Amsterdam 14 M M M M M UPDATE t1 SET a=2 WHERE a=1UPDATE t1 SET a=3 WHERE a=1 OK
  • 15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Multi-Master update everywhere! • Any two transactions on different servers can write to the same tuple. • Conflicts will be detected and dealt with (first committer wins rule). Tuesday, September 22, 2015 Percona Live - Amsterdam 15 M M M M M UPDATE t1 SET a=4 WHERE a=2UPDATE t1 SET a=3 WHERE a=1
  • 16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Multi-Master update everywhere! • Any two transactions on different servers can write to the same tuple. • Conflicts will be detected and dealt with (first committer wins rule). Tuesday, September 22, 2015 Percona Live - Amsterdam 16 M M M M M UPDATE t1 SET a=4 WHERE a=2UPDATE t1 SET a=3 WHERE a=1 OKOK
  • 17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication2 Tuesday, September 22, 2015 2.1 2.2 Percona Live - Amsterdam Multi-Master Automatic distributed server recovery
  • 18. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Automatic distributed server recovery! • Server that joins the group will automatically synchronize with the others. Tuesday, September 22, 2015 Percona Live - Amsterdam 18 M M M M M N I want to play with you
  • 19. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Automatic distributed server recovery! • Server that joins the group will automatically synchronize with the others. Tuesday, September 22, 2015 Percona Live - Amsterdam 19 M M M M M N ONLINE RECOVERING
  • 20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Automatic distributed server recovery! • Server that joins the group will automatically synchronize with the others. Tuesday, September 22, 2015 Percona Live - Amsterdam 20 M M M M M N ONLINE
  • 21. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Automatic distributed server recovery! • If a server leaves the group, the others will automatically be informed. Tuesday, September 22, 2015 Percona Live - Amsterdam 21 M M M M M N My machine needs maintenance or a system crash happens Each membership configuration is identified by a view_id view_id: 4
  • 22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Automatic distributed server recovery! • If a server leaves the group, the others will automatically be informed. Tuesday, September 22, 2015 Percona Live - Amsterdam 22 M M M M N view_id: 5
  • 23. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Automatic distributed server recovery! • Server that (re)joins the group will automatically synchronize with the others. Tuesday, September 22, 2015 Percona Live - Amsterdam 23 M M M M M N RECOVERING -> ONLINE view_id: 6
  • 24. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication2 Tuesday, September 22, 2015 2.1 2.2 2.3 Percona Live - Amsterdam Multi-Master Automatic distributed server recovery MySQL/InnoDB look & feel
  • 25. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL/InnoDB look & feel! • Load the plugin and start replicating. • Monitor group replication stats though Performance Schema tables. Tuesday, September 22, 2015 Percona Live - Amsterdam 25 mysql> SET GLOBAL group_replication_group_name= "9eb07c6d-5e24-11e5-854b-34028662c0cd"; mysql> START GROUP_REPLICATION; mysql> SELECT * FROM performance_schema.replication_group_membersG *************************** 1. row *************************** CHANNEL_NAME: group_replication_applier MEMBER_ID: 597dbb72-3e2c-11e4-9d9d-ecf4bb227f3b MEMBER_HOST: nightfury MEMBER_PORT: 13000 MEMBER_STATE: ONLINE *************************** 2. row *************************** ...
  • 26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL/InnoDB look & feel! • Load the plugin and start replicating. • Monitor group replication stats though Performance Schema tables. Tuesday, September 22, 2015 Percona Live - Amsterdam 26 mysql> SELECT * FROM performance_schema.replication_group_member_statsG *************************** 1. row *************************** CHANNEL_NAME: group_replication_applier VIEW_ID: 1428497631:3 MEMBER_ID: e38fdea8-dded-11e4-b211-e8b1fc3848de COUNT_TRANSACTIONS_IN_QUEUE: 0 COUNT_TRANSACTIONS_CHECKED: 12 COUNT_CONFLICTS_DETECTED: 5 COUNT_TRANSACTIONS_VALIDATING: 6 TRANSACTIONS_COMMITTED_ALL_MEMBERS: 8a84f397-aaa4-18df-89ab-c70aa9823561:1-7 LAST_CONFLICT_FREE_TRANSACTION: 8a84f397-aaa4-18df-89ab-c70aa9823561:7
  • 27. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL/InnoDB look & feel! • Load the plugin and start replicating. • Monitor group replication stats though Performance Schema tables. Tuesday, September 22, 2015 Percona Live - Amsterdam 27 mysql> SELECT * FROM performance_schema.replication_connection_statusG *************************** 1. row *************************** CHANNEL_NAME: group_replication_applier GROUP_NAME: 8a94f357-aab4-11df-86ab-c80aa9429563 SOURCE_UUID: 8a94f357-aab4-11df-86ab-c80aa9429563 THREAD_ID: NULL SERVICE_STATE: ON ...
  • 28. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication2 Tuesday, September 22, 2015 2.1 2.2 2.3 2.4 Percona Live - Amsterdam Multi-Master Automatic distributed server recovery MySQL/InnoDB look & feel Full GTID support
  • 29. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Full GTID support! • All group members share the same UUID, the group name. Tuesday, September 22, 2015 Percona Live - Amsterdam 29 M M M M M INSERT y; Will have GTID: group_name:2 INSERT x; Will have GTID: group_name:1
  • 30. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Full GTID support! • Users can specify the identifier for the transaction. Tuesday, September 22, 2015 Percona Live - Amsterdam 30 M M M M M INSERT y; Will have GTID: group_name:1 SET GTID_NEXT= “UUID:50” INSERT x;
  • 31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Full GTID support! • You can even replicate from a outside server to a group, global identifiers will be preserved. Tuesday, September 22, 2015 Percona Live - Amsterdam 31 M M M M M Conflicts will be detected!
  • 32. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication2 Tuesday, September 22, 2015 2.1 2.2 2.3 2.4 2.5 Percona Live - Amsterdam Multi-Master Automatic distributed server recovery MySQL/InnoDB look & feel Auto-increment configuration/handling Full GTID support
  • 33. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Auto-increment configuration/handling • Group is configured not to generate the same auto-increment value on all members. Tuesday, September 22, 2015 Percona Live - Amsterdam 33 M M M M M INSERT y; y: 4 INSERT z; z: 11 INSERT x; x: 1
  • 34. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Auto-increment configuration/handling • By default, the offset is provided by server_id and increment is 7 [1]. Tuesday, September 22, 2015 Percona Live - Amsterdam 34 M M M M M INSERT y; y: 4 INSERT z; z: 11 INSERT x; x: 1 [1]: http://mysqlhighavailability.com/mysql-group-replication-auto-increment-configuration-handling/ server_id: 1 server_id: 4
  • 35. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Auto-increment configuration/handling • Users can change the increment size to their needs using GROUP_REPLICATION_AUTO_INCREMENT_INCREMENT option. Tuesday, September 22, 2015 Percona Live - Amsterdam 35 M M M M M INSERT y; y: 4 INSERT z; z: 11 INSERT x; x: 1 server_id: 1 server_id: 4
  • 36. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Plugin version access control MySQL Group Replication2 Tuesday, September 22, 2015 2.1 2.2 2.3 2.4 2.5 Percona Live - Amsterdam 2.6 Multi-Master Automatic distributed server recovery MySQL/InnoDB look & feel Auto-increment configuration/handling Full GTID support
  • 37. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Plugin Version Access Control • When joining, versions are crucial when determining if a member is compatible with a group. Tuesday, September 22, 2015 Percona Live - Amsterdam 37 0.4.1 0.4.2 0.4.2 0.4.3 0.4.0 Member with lower patch version is allowed to join
  • 38. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Plugin Version Access Control • When joining, versions are crucial when determining if a member is compatible with a group. Tuesday, September 22, 2015 Percona Live - Amsterdam 38 0.4.0 0.4.2 0.5.0 0.5.1 0.4.0 Member with lower minor version than the maximum minor version in the group is not allowed to join
  • 39. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Plugin Version Access Control • When joining, versions are crucial when determining if a member is compatible with a group. Tuesday, September 22, 2015 Percona Live - Amsterdam 39 0.4.0 0.4.0 0.4.1 0.4.2 0.5.0 Member with higher minor version is allowed to join
  • 40. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Requirements Plugin version access control MySQL Group Replication2 Tuesday, September 22, 2015 2.1 2.2 2.3 2.4 2.5 Percona Live - Amsterdam 2.6 2.7 Multi-Master Automatic distributed server recovery MySQL/InnoDB look & feel Auto-increment configuration/handling Full GTID support
  • 41. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Requirements (by design) • Only supports InnoDB. • Primary key is required on every table. • Requires global transaction identifiers turned on. • Optimistic execution: transactions may abort on COMMIT due to conflicts with concurrent transactions on other members. Tuesday, September 22, 2015 Percona Live - Amsterdam 41
  • 42. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Requirements Plugin version access control MySQL Group Replication2 Tuesday, September 22, 2015 2.1 2.2 2.3 2.4 2.5 Percona Live - Amsterdam 2.6 2.7 Multi-Master Automatic distributed server recovery MySQL/InnoDB look & feel Auto-increment configuration/handling 2.8 Full GTID support Limitations
  • 43. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Limitations • Concurrent DDL is not supported. • Limited transaction payload size. Tuesday, September 22, 2015 Percona Live - Amsterdam 43
  • 44. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Architecture Introduction 3 Tuesday, September 22, 2015 3.1 Percona Live - Amsterdam
  • 45. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication is • Built on top of proven technology! – Shares many of MySQL Replication. – Multi-Master approach to replication. • Built on reusable components! – Layered implementation approach. – Interface driven development. – Decoupled from the server core. – The plugin registers as listener to server events. – Reuses the capture procedure from regular replication. – Provides further decoupling from the communication infrasctructure. Tuesday, September 22, 2015 Percona Live - Amsterdam 45
  • 46. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Major Building Blocks Architecture Introduction 3 Tuesday, September 22, 2015 3.1 3.2 Percona Live - Amsterdam
  • 47. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Major Building Blocks (1) Tuesday, September 22, 2015 Percona Live - Amsterdam 47 M M M M M Com. API Replication Plugin API MySQL Server Group Comm. System (Corosync) Group Comm. System (Corosync)
  • 48. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Major Building Blocks (2) • Server calls into the plugin through a generic interface – (Most of server) internals are hidden from the plugin. – Some of the semi-sync interfaces were reused. Others were deployed. • 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. Tuesday, September 22, 2015 Percona Live - Amsterdam 48 Com. API Replication Plugin API MySQL Server Group Comm. System (Corosync) Group Comm. System (Corosync)
  • 49. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Major Building Blocks (3) • The plugin is responsible for – Maintaining distributed execution context. – Detecting conflicts. – Handling distributed recovery: • Detect membership changes; • Donate state if needed; • Collect state if needed. – Receiving and handling transactions from other members. – Deciding the fate of on-going transactions. Tuesday, September 22, 2015 Percona Live - Amsterdam 49 Com. API Replication Plugin API MySQL Server Group Comm. System (Corosync) Group Comm. System (Corosync)
  • 50. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Major Building Blocks (4) • The communication API (and bindings) is responsible for: – Abstracting the underlaying communication system from the plugin itself. – Maping the interface to a specific communication toolkit: • Currently, MySQL Group Replication uses Corosync as the underlying group communication system. Tuesday, September 22, 2015 Percona Live - Amsterdam 50 Com. API Replication Plugin API MySQL Server Group Comm. System (Corosync) Group Comm. System (Corosync)
  • 51. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The Complete Stack Major Building Blocks Architecture Introduction 3 Tuesday, September 22, 2015 3.1 3.2 3.3 Percona Live - Amsterdam
  • 52. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The Complete Stack Tuesday, September 22, 2015 Percona Live - Amsterdam 52 API Replication Plugin API MySQL Server Performance Schema Tables: Monitoring MySQL APIs: Lifecycle / Capture / Applier InnoDB Replication Protocol Group Comm. API Corosync Network Plugin Capture Applier Conflicts Handler Group Comm. System (Corosync) Group Comm. System (Corosync) Group Comm. Binding Recovery
  • 53. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Use cases Use cases 4 Tuesday, September 22, 2015 4.1 Percona Live - Amsterdam
  • 54. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Use Cases • Elastic Replication – Environments that require a very fluid replication infrastructure, where the number of servers has to grow or shrink dynamically and with as little pain as possible. • Highly Available Shards – Sharding is a popular approach to achieve write scale-out. Users can use MySQL Group Replication to implement highly available shards. Each shard can map into a Replication Group. • Alternative to Master-Slave replication – It may be that a single master server makes it a single point of contention. Writing to an entire group may prove more scalable under certain circumstances. Tuesday, September 22, 2015 Percona Live - Amsterdam 54
  • 55. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Router Use cases Use cases 4 Tuesday, September 22, 2015 4.1 4.2 Percona Live - Amsterdam
  • 56. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Router • Motivation – The need for transparent integration with Fabric. • No need to upgrade existing connectors. • Use Fabric with connectors that do not support it (e.g., Ruby, Perl, C). – The need for read-write and read-only automatic routing. • Do not need to know which server is the master. • Transparent fail-over support for a new master. • End Result – Generic and versatile framework: MySQL Router. Tuesday, September 22, 2015 Percona Live - Amsterdam NEW M Router App M M Fabric 56
  • 57. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Router • Highlights – High Performance – Plugin Driven Architecture – Simple to setup, configure and deploy. • Features – Simple Load balancing – Seamless fail-over based on Fabric HA Groups – Basic support for minimizing transaction conflicts when deployed together with multi-master mode on Group Replication. Tuesday, September 22, 2015 Percona Live - Amsterdam M Router App M M Fabric NEW 57
  • 58. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Server/Shard State & Mapping MySQL Scaling (HA + Sharding) MySQL Fabric Controller HA Group Coordination and Control 58 MySQL Router Tuesday, September 22, 2015 Percona Live - Amsterdam M M M Shard 1 HA Group M M M Shard 2 HA Group M M M Shard N
  • 59. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Conclusion5 Tuesday, September 22, 2015 Percona Live - Amsterdam
  • 60. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Summary • Cloud Friendly – Great techonology for deployments where elasticity is a requirement, such as cloud based infrastructures. • Integrated – With server core through a well defined API. – With GTIDs, row based replication, performance schema tables. • Autonomic and Operations Friendly – It is self-healing: no admin overhead for handling server fail-overs. – Provides fault-tolerance, enables multi-master update everywhere and a dependable MySQL service. • Lab releases provide a sneak peek at what is coming - a new replication plugin and exciting new infrastructure: MySQL Group Replication and MySQL Router. Tuesday, September 22, 2015 Percona Live - Amsterdam 60
  • 61. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Where to go from here? • Packages – http://labs.mysql.com • Blogs from the Engineers (news, technical information, and much more) – http://mysqlhighavailability.com Tuesday, September 22, 2015 Percona Live - Amsterdam 61