SlideShare a Scribd company logo
1 of 28
Open Source India, 2014 
MySQL Group Replication 
Manish Kumar (manish.4.kumar@oracle.com) 
Senior Member technical Staff, MySQL Replication Team 
2 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Safe Harbor Statement 
The following is intended to outline our general product direction. It is 
intended for information purposes only, and may not be incorporated 
into any contract. It is not a commitment to deliver any material, code, 
or functionality, and should not be relied upon in making purchasing 
decisions. The development, release, and timing of any features or 
functionality described for Oracle’s products remains at the sole 
discretion of Oracle. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
MySQL Labs features are not fit for production. 
They are provided solely for testing purposes, to try the latest bug fixes and 
generally to keep up with the development. 
Please, do not use these binaries in production. 
Instead, install them on a spare server. 
If you are looking for production ready binaries, please visit MySQL Downloads. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
MySQL Group Replication : 
 Multi-master update everywhere with conflict resolution. 
 Automatic distributed member recovery 
— When a server joins the group, it gets all the missing transactions before actually 
start serving requests. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Group-Based Replication Plugin 
M M M M M 
MySQL 
Server 
API 
Replication 
Plugin 
Group Comm. 
System (Corosync) 
Group Comm. 
System (Corosync) 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Group-Based Replication Plugin 
Update ... 
M M M M M 
Application issues an update. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Group-Based Replication Plugin 
M M M M M 
Replication 
Events 
Application issues an update. 
Master executes and multi/broadcasts 
the update to the other servers. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Group-Based Replication Plugin 
M M M M M 
Application issues an update. 
Master executes and multi/broadcasts 
the update to the other servers. 
Servers receive same transaction in the 
same order and check for conflicts. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Group-Based Replication Plugin 
M M M M M 
Application issues an update. 
Master executes and multi/broadcasts 
the update to the other servers. 
Servers receive same transaction in the 
same order and check for conflicts. 
All servers, independently, decide to 
commit the transaction – no conflicts. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Group-Based Replication Plugin 
Application issues an update. 
Master executes and multi/broadcasts 
the update to the other servers. 
Servers receive same transaction in the 
same order and check for conflicts. 
All servers, independently, decide to 
commit the transaction – no conflicts. 
Originating master replies to the 
application. 
M M M M M 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
MySQL Group Replication: Use Cases 
● Automatic group membership management and failure detection 
- No need for server fail-over 
● No single point of failure 
- Automatic reconfiguration 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Under the hood 
● Each server can belong to a group. 
● The Group is identified by a name which is the Group UUID string, so group behaves 
like a single server. 
● The Group UUID is used to log transactions. 
● Whenever a server joins or leaves, it will start a new stable period in time on which 
servers can agree on distributed decisions. A special message called View Message 
is sent to each group member notifying that. 
● Server join/leave can be issue manually or by scripts by DBA. 
● Server leave can be caused also by node failures.
 Current used group communication toolkit is Corosync. It provides: 
— Virtual synchrony guarantees for creating replicated state machines. 
 Replicated state machine simple definition: 
— If a set of processes with the same initial state receives the same set of deterministic 
messages at the same order, them will reach the same state. 
 All write operations are sent to all group members for certification. 
 Read operations are only local. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
Under the hood
COMMIT dbv: 2 
OK 
OK 
OK 
Certification - Positive 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
s1 
s2 
dbv: 1 UPDATE 
dbv: 2 
s3 
dbv: 2 
COMMIT 
COMMIT 
cv: 1 1 >= 1 
1 >= 1 
1 >= 1 
cv: 1 
cv: 1 
dbv: 1 
dbv: 1 
cv: 2 
cv: 2 
cv: 2 
s ← server 
v ← snapshot version 
sn ← certifier sequence number (write set version)
T1: COMMIT dbv: 2 
OK 
OK 
Certification - Negative 
T2: UPDATE cv: 2 
OK 
KO 
KO 
KO 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
s1 
s2 
dbv: 1 T1: UPDATE 
dbv: 2 
s3 
dbv: 2 
T1: COMMIT 
T1: COMMIT 
cv: 1 
cv: 1 
cv: 1 
1 >= 1 
1 >= 1 
1 >= 1 
cv: 2 
cv: 2 
1 >= 2 
1 >= 2 
1 >= 2 
dbv: 1 
dbv: 1 
s ← server 
v ← snapshot version 
sn ← certifier sequence number (write set version)
Automated distributed member recovery 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
R1 
R2 
R3 
R4 
GCS 
R1 
R2 
R3 
R4 
R4 joins the group. 
GCS
Automated distributed member recovery 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
R1 
R2 
R3 
R4 
R1 is R4 Donor 
GCS 
R1 
R2 
R3 
R4 
GCS
Automated distributed member recovery 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
R1 
R2 
R3 
R4 
GCS 
R1 
R2 
R3 
R4 
GCS
Automated distributed member recovery 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
R1 
R2 
R3 
R4 
GCS 
R1 
R2 
R3 
R4 
R4 has caught up 
with the view! 
GCS
Automated distributed member recovery 
R1 
R2 
R3 
R4 
GCS 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
R1 
R2 
R3 
R4 
GCS 
Execute buffered 
transactions from the view.
PERFORMANCE SCHEMA TABLE 
– REPLICATION_NODE_STATUS 
● Statistics regarding Applier and Certifier module. 
– REPLICATION_CONNECTION_NODES 
● Information regarding different nodes in the group and its 
connection details 
– REPLICATION_CONNECTION_STATUS 
● Extended table to give details about the group connection status. 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Replication Monitoring: replication_node_status 
node1> SELECT * FROM performance_schema.replication_node_statusG 
*************************** 1. row *************************** 
GROUP_NAME: 8a84f397-aaa4-18df-89ab-c70aa9823561 
NODE_ID: 2af09cb1-3e46-11e4-9e45-ecf4bb227f3b 
TRANSACTIONS_IN_QUEUE: 0 
CERTIFIED_TRANSACTIONS: 12 
POSITIVELY_CERTIFIED: 7 
NEGATIVELY_CERTIFIED: 5 
CERTIFICATION_DB_SIZE: 6 
STABLE_SET: 8a84f397-aaa4-18df-89ab-c70aa9823561:1-7 
LAST_CERTIFIED_TRANSACTION: 8a84f397-aaa4-18df-89ab-c70aa9823561:7 
APPLIER_MODULE_STATUS: ON 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Replication Monitoring: replication_node_status 
node1> SELECT * FROM performance_schema.replication_connection_nodesG 
*************************** 1. row *************************** 
GROUP_NAME 8a94f357-aab4-11df-86ab-c80aa9429573 
NODE_ID 597dbb72-3e2c-11e4-9d9d-ecf4bb227f3b 
NODE_HOST nightfury 
NODE_PORT 13000 
NODE_STATE ONLINE 
*************************** 2. row *************************** 
GROUP_NAME 8a94f357-aab4-11df-86ab-c80aa9429573 
NODE_ID 59efb8a1-3e2c-11e4-9d9d-ecf4bb227f3b 
NODE_HOST nightfury 
NODE_PORT 13001 
NODE_STATE ONLINE 
*************************** 3. row *************************** 
GROUP_NAME 8a94f357-aab4-11df-86ab-c80aa9429573 
NODE_ID 5a706f6b-3e2c-11e4-9d9d-ecf4bb227f3b 
NODE_HOST nightfury 
NODE_PORT 13002 
NODE_STATE RECOVERING 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Replication Monitoring: replication_node_status 
node1> SELECT * FROM performance_schema.replication_connection_statusG 
*************************** 1. row *************************** 
GROUP_NAME: 8a94f357-aab4-11df-86ab-c80aa9429563 
SOURCE_UUID: 8a94f357-aab4-11df-86ab-c80aa9429563 
THREAD_ID: NULL 
SERVICE_STATE: ON 
COUNT_RECEIVED_HEARTBEATS: 0 
LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00 
RECEIVED_TRANSACTION_SET: 
LAST_ERROR_NUMBER: 0 
LAST_ERROR_MESSAGE: 
LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00 
TOTAL_MESSAGES_RECEIVED: 9 
TOTAL_MESSAGES_SENT: 5 
TOTAL_BYTES_RECEIVED: 1891 
TOTAL_BYTES_SENT: 1065 
LAST_MESSAGE_TIMESTAMP: 2014-09-23 09:20:26 
MAX_MESSAGE_LENGTH: 358 
MIN_MESSAGE_LENGTH: 51 
VIEW_ID: 2 
NUMBER_OF_NODES: 2 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
Limitations 
 Only transactional engines are supported (currently only InnoDB). 
 All tables must have primary key 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | 
 GTID must be enabled. 
 Only deterministic DDL is allowed. 
 Optimistic execution: transactions may abort on COMMIT.
Read More About MySQL Group Replication 
● Read a feature preview of MySQL Group replication on Luis' blog: 
http://mysqlhighavailability.com/mysql-group-replication-hello-world/ 
 Read about how to get started with MySQL Group replication on Pedro's blog: 
http://mysqlhighavailability.com/getting-started-with-mysql-group-replication/ 
● Read about Transaction life cycle in MySQL Group replication on Nuno's blog: 
http://mysqlhighavailability.com/mysql-group-replication-transaction-life-cycle-explained/ 
● Read about Distributed recovery in MySQL Group Replication on Pedro's blog: 
http://mysqlhighavailability.com/distributed-recovery-behind-the-scenes/ 
● Read about Monitoring for MySQL Group Replication on Manish's blog: 
http://mysqlhighavailability.com/mysql-group-replication-monitoring/ 
● Read about Corosync and Group Communication details on Tiago's blog: 
http://mysqlhighavailability.com/group-communication-behind-the-scenes/ 
http://mysqlhighavailability.com/mysql-group-replication-a-small-corosync-guide/ 
● Read about Testing of MySQL Group Replication on Manish's blog: 
http://mysqlhighavailability.com/mysql-group-replication-testing/ 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
MySQL Group Replication @osi days 2014

More Related Content

What's hot

108 advancedjava
108 advancedjava108 advancedjava
108 advancedjava
Anil Kumar
 

What's hot (20)

Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?
 
Mule ESB- Data Validation- Best Practices
Mule ESB-  Data Validation- Best PracticesMule ESB-  Data Validation- Best Practices
Mule ESB- Data Validation- Best Practices
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
Setting Up Development Environment For Google App Engine & Python | Talentica
Setting Up Development Environment For Google App Engine & Python | TalenticaSetting Up Development Environment For Google App Engine & Python | Talentica
Setting Up Development Environment For Google App Engine & Python | Talentica
 
Advanced JAVA
Advanced JAVAAdvanced JAVA
Advanced JAVA
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
 
1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand
 
Api design and prototype
Api design and prototypeApi design and prototype
Api design and prototype
 
Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9
 
Java mobility (1)
Java mobility (1)Java mobility (1)
Java mobility (1)
 
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
 
Zure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training dayZure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training day
 
2/3 : CDI advanced - Antoine Sabot-Durand
2/3 : CDI advanced - Antoine Sabot-Durand2/3 : CDI advanced - Antoine Sabot-Durand
2/3 : CDI advanced - Antoine Sabot-Durand
 
Building microservice for api with helidon and cicd pipeline
Building microservice for api with helidon and cicd pipelineBuilding microservice for api with helidon and cicd pipeline
Building microservice for api with helidon and cicd pipeline
 
A Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceA Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark Performance
 
Java EE Arquillian Testing with Docker & The Cloud
Java EE Arquillian Testing with Docker & The CloudJava EE Arquillian Testing with Docker & The Cloud
Java EE Arquillian Testing with Docker & The Cloud
 
JavaFX Uni Parthenope
JavaFX Uni ParthenopeJavaFX Uni Parthenope
JavaFX Uni Parthenope
 
Hibernate complete notes_by_sekhar_sir_javabynatara_j
Hibernate complete notes_by_sekhar_sir_javabynatara_jHibernate complete notes_by_sekhar_sir_javabynatara_j
Hibernate complete notes_by_sekhar_sir_javabynatara_j
 
Migrating From Applets to Java Desktop Apps in JavaFX
Migrating From Applets to Java Desktop Apps in JavaFXMigrating From Applets to Java Desktop Apps in JavaFX
Migrating From Applets to Java Desktop Apps in JavaFX
 
108 advancedjava
108 advancedjava108 advancedjava
108 advancedjava
 

Similar to MySQL Group Replication @osi days 2014

Mysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp : 20-June-14 : Mysql FabricMysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp
 

Similar to MySQL Group Replication @osi days 2014 (20)

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
 
Multi source replication pdf
Multi source replication pdfMulti source replication pdf
Multi source replication pdf
 
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
 
Mysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp : 20-June-14 : Mysql FabricMysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp : 20-June-14 : Mysql Fabric
 
Open source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source ReplicationOpen source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source Replication
 
MySQL High Availability - Managing Farms of Distributed Servers
MySQL High Availability - Managing Farms of Distributed ServersMySQL High Availability - Managing Farms of Distributed Servers
MySQL High Availability - Managing Farms of Distributed Servers
 
FOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group ReplicationFOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group Replication
 
Elastic Scalability in MySQL Fabric Using OpenStack
Elastic Scalability in MySQL Fabric Using OpenStackElastic Scalability in MySQL Fabric Using OpenStack
Elastic Scalability in MySQL Fabric Using OpenStack
 
Em13c New Features- Two of Two
Em13c New Features- Two of TwoEm13c New Features- Two of Two
Em13c New Features- Two of Two
 
My sql fabric webinar v1.1
My sql fabric webinar v1.1My sql fabric webinar v1.1
My sql fabric webinar v1.1
 
MySQL Fabric Tutorial, October 2014
MySQL Fabric Tutorial, October 2014MySQL Fabric Tutorial, October 2014
MySQL Fabric Tutorial, October 2014
 
New Not Your Father's Enterprise Manager
New Not Your Father's Enterprise ManagerNew Not Your Father's Enterprise Manager
New Not Your Father's Enterprise Manager
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
 
Oracle SQL Developer for the DBA
Oracle SQL Developer for the DBAOracle SQL Developer for the DBA
Oracle SQL Developer for the DBA
 
QA standup - workload analysis
QA standup  - workload analysisQA standup  - workload analysis
QA standup - workload analysis
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance Improvement
 
MySQL Fabric
MySQL FabricMySQL Fabric
MySQL Fabric
 
Oracle Cloud Platform - Migrer vers la Database 12c
Oracle Cloud Platform - Migrer vers la Database 12cOracle Cloud Platform - Migrer vers la Database 12c
Oracle Cloud Platform - Migrer vers la Database 12c
 
20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates
 
MySQL Fabric - High Availability & Automated Sharding for MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQLMySQL Fabric - High Availability & Automated Sharding for MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQL
 

Recently uploaded

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Recently uploaded (20)

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration Tooling
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 

MySQL Group Replication @osi days 2014

  • 1.
  • 2. Open Source India, 2014 MySQL Group Replication Manish Kumar (manish.4.kumar@oracle.com) Senior Member technical Staff, MySQL Replication Team 2 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 3. Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 4. MySQL Labs features are not fit for production. They are provided solely for testing purposes, to try the latest bug fixes and generally to keep up with the development. Please, do not use these binaries in production. Instead, install them on a spare server. If you are looking for production ready binaries, please visit MySQL Downloads. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 5. MySQL Group Replication :  Multi-master update everywhere with conflict resolution.  Automatic distributed member recovery — When a server joins the group, it gets all the missing transactions before actually start serving requests. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 6. Group-Based Replication Plugin M M M M M MySQL Server API Replication Plugin Group Comm. System (Corosync) Group Comm. System (Corosync) Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 7. Group-Based Replication Plugin Update ... M M M M M Application issues an update. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 8. Group-Based Replication Plugin M M M M M Replication Events Application issues an update. Master executes and multi/broadcasts the update to the other servers. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 9. Group-Based Replication Plugin M M M M M Application issues an update. Master executes and multi/broadcasts the update to the other servers. Servers receive same transaction in the same order and check for conflicts. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 10. Group-Based Replication Plugin M M M M M Application issues an update. Master executes and multi/broadcasts the update to the other servers. Servers receive same transaction in the same order and check for conflicts. All servers, independently, decide to commit the transaction – no conflicts. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 11. Group-Based Replication Plugin Application issues an update. Master executes and multi/broadcasts the update to the other servers. Servers receive same transaction in the same order and check for conflicts. All servers, independently, decide to commit the transaction – no conflicts. Originating master replies to the application. M M M M M Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 12. MySQL Group Replication: Use Cases ● Automatic group membership management and failure detection - No need for server fail-over ● No single point of failure - Automatic reconfiguration Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Under the hood ● Each server can belong to a group. ● The Group is identified by a name which is the Group UUID string, so group behaves like a single server. ● The Group UUID is used to log transactions. ● Whenever a server joins or leaves, it will start a new stable period in time on which servers can agree on distributed decisions. A special message called View Message is sent to each group member notifying that. ● Server join/leave can be issue manually or by scripts by DBA. ● Server leave can be caused also by node failures.
  • 14.  Current used group communication toolkit is Corosync. It provides: — Virtual synchrony guarantees for creating replicated state machines.  Replicated state machine simple definition: — If a set of processes with the same initial state receives the same set of deterministic messages at the same order, them will reach the same state.  All write operations are sent to all group members for certification.  Read operations are only local. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | Under the hood
  • 15. COMMIT dbv: 2 OK OK OK Certification - Positive Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | s1 s2 dbv: 1 UPDATE dbv: 2 s3 dbv: 2 COMMIT COMMIT cv: 1 1 >= 1 1 >= 1 1 >= 1 cv: 1 cv: 1 dbv: 1 dbv: 1 cv: 2 cv: 2 cv: 2 s ← server v ← snapshot version sn ← certifier sequence number (write set version)
  • 16. T1: COMMIT dbv: 2 OK OK Certification - Negative T2: UPDATE cv: 2 OK KO KO KO Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | s1 s2 dbv: 1 T1: UPDATE dbv: 2 s3 dbv: 2 T1: COMMIT T1: COMMIT cv: 1 cv: 1 cv: 1 1 >= 1 1 >= 1 1 >= 1 cv: 2 cv: 2 1 >= 2 1 >= 2 1 >= 2 dbv: 1 dbv: 1 s ← server v ← snapshot version sn ← certifier sequence number (write set version)
  • 17. Automated distributed member recovery Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | R1 R2 R3 R4 GCS R1 R2 R3 R4 R4 joins the group. GCS
  • 18. Automated distributed member recovery Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | R1 R2 R3 R4 R1 is R4 Donor GCS R1 R2 R3 R4 GCS
  • 19. Automated distributed member recovery Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | R1 R2 R3 R4 GCS R1 R2 R3 R4 GCS
  • 20. Automated distributed member recovery Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | R1 R2 R3 R4 GCS R1 R2 R3 R4 R4 has caught up with the view! GCS
  • 21. Automated distributed member recovery R1 R2 R3 R4 GCS Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. | R1 R2 R3 R4 GCS Execute buffered transactions from the view.
  • 22. PERFORMANCE SCHEMA TABLE – REPLICATION_NODE_STATUS ● Statistics regarding Applier and Certifier module. – REPLICATION_CONNECTION_NODES ● Information regarding different nodes in the group and its connection details – REPLICATION_CONNECTION_STATUS ● Extended table to give details about the group connection status. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 23. Replication Monitoring: replication_node_status node1> SELECT * FROM performance_schema.replication_node_statusG *************************** 1. row *************************** GROUP_NAME: 8a84f397-aaa4-18df-89ab-c70aa9823561 NODE_ID: 2af09cb1-3e46-11e4-9e45-ecf4bb227f3b TRANSACTIONS_IN_QUEUE: 0 CERTIFIED_TRANSACTIONS: 12 POSITIVELY_CERTIFIED: 7 NEGATIVELY_CERTIFIED: 5 CERTIFICATION_DB_SIZE: 6 STABLE_SET: 8a84f397-aaa4-18df-89ab-c70aa9823561:1-7 LAST_CERTIFIED_TRANSACTION: 8a84f397-aaa4-18df-89ab-c70aa9823561:7 APPLIER_MODULE_STATUS: ON Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 24. Replication Monitoring: replication_node_status node1> SELECT * FROM performance_schema.replication_connection_nodesG *************************** 1. row *************************** GROUP_NAME 8a94f357-aab4-11df-86ab-c80aa9429573 NODE_ID 597dbb72-3e2c-11e4-9d9d-ecf4bb227f3b NODE_HOST nightfury NODE_PORT 13000 NODE_STATE ONLINE *************************** 2. row *************************** GROUP_NAME 8a94f357-aab4-11df-86ab-c80aa9429573 NODE_ID 59efb8a1-3e2c-11e4-9d9d-ecf4bb227f3b NODE_HOST nightfury NODE_PORT 13001 NODE_STATE ONLINE *************************** 3. row *************************** GROUP_NAME 8a94f357-aab4-11df-86ab-c80aa9429573 NODE_ID 5a706f6b-3e2c-11e4-9d9d-ecf4bb227f3b NODE_HOST nightfury NODE_PORT 13002 NODE_STATE RECOVERING Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 25. Replication Monitoring: replication_node_status node1> SELECT * FROM performance_schema.replication_connection_statusG *************************** 1. row *************************** GROUP_NAME: 8a94f357-aab4-11df-86ab-c80aa9429563 SOURCE_UUID: 8a94f357-aab4-11df-86ab-c80aa9429563 THREAD_ID: NULL SERVICE_STATE: ON COUNT_RECEIVED_HEARTBEATS: 0 LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00 RECEIVED_TRANSACTION_SET: LAST_ERROR_NUMBER: 0 LAST_ERROR_MESSAGE: LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00 TOTAL_MESSAGES_RECEIVED: 9 TOTAL_MESSAGES_SENT: 5 TOTAL_BYTES_RECEIVED: 1891 TOTAL_BYTES_SENT: 1065 LAST_MESSAGE_TIMESTAMP: 2014-09-23 09:20:26 MAX_MESSAGE_LENGTH: 358 MIN_MESSAGE_LENGTH: 51 VIEW_ID: 2 NUMBER_OF_NODES: 2 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |
  • 26. Limitations  Only transactional engines are supported (currently only InnoDB).  All tables must have primary key Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |  GTID must be enabled.  Only deterministic DDL is allowed.  Optimistic execution: transactions may abort on COMMIT.
  • 27. Read More About MySQL Group Replication ● Read a feature preview of MySQL Group replication on Luis' blog: http://mysqlhighavailability.com/mysql-group-replication-hello-world/  Read about how to get started with MySQL Group replication on Pedro's blog: http://mysqlhighavailability.com/getting-started-with-mysql-group-replication/ ● Read about Transaction life cycle in MySQL Group replication on Nuno's blog: http://mysqlhighavailability.com/mysql-group-replication-transaction-life-cycle-explained/ ● Read about Distributed recovery in MySQL Group Replication on Pedro's blog: http://mysqlhighavailability.com/distributed-recovery-behind-the-scenes/ ● Read about Monitoring for MySQL Group Replication on Manish's blog: http://mysqlhighavailability.com/mysql-group-replication-monitoring/ ● Read about Corosync and Group Communication details on Tiago's blog: http://mysqlhighavailability.com/group-communication-behind-the-scenes/ http://mysqlhighavailability.com/mysql-group-replication-a-small-corosync-guide/ ● Read about Testing of MySQL Group Replication on Manish's blog: http://mysqlhighavailability.com/mysql-group-replication-testing/ Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Open Source India | Bangalore, India, 8th November, 2014. |

Editor's Notes

  1. <number>
  2. New Cluster 7.3DMR, available now for download and eval Intros QA Recorded
  3. This is a Safe Harbor Front slide, one of two Safe Harbor Statement slides included in this template. One of the Safe Harbor slides must be used if your presentation covers material affected by Oracle’s Revenue Recognition Policy To learn more about this policy, e-mail: Revrec-americasiebc_us@oracle.com For internal communication, Safe Harbor Statements are not required. However, there is an applicable disclaimer (Exhibit E) that should be used, found in the Oracle Revenue Recognition Policy for Future Product Communications. Copy and paste this link into a web browser, to find out more information.   http://my.oracle.com/site/fin/gfo/GlobalProcesses/cnt452504.pdf For all external communications such as press release, roadmaps, PowerPoint presentations, Safe Harbor Statements are required. You can refer to the link mentioned above to find out additional information/disclaimers required depending on your audience. <number>
  4. <number>