SlideShare a Scribd company logo
9
Most read
10
Most read
11
Most read
Group Replication In MYSQL 8.0
A walk through
Presented by
VIGNESH PRABHU S
www.mydbops.com info@mydbops.com
About Mydbops
● Founded in 2015, HQ in Bangalore India with 450+ customer base across the globe.
● Mydbops is on Database Consulting with core specialization on MySQL ,MongoDB & PostgreSQL
Administration and Support.
● We have expert team with 30+ certified DBA’s providing full time support and currently managing 300+
servers on cloud.
● Mydbops was created with a motto of developing a Devops model for Database administration offering
24*7 expert remote DBA support.
● We help organisations to architect and scale systems in MySQL/Mongo by implementing the advanced
technologies in industry which are completely open source.
● We are a leading solution provider in the market for all sort of cloud based deployments and management.
Agenda
● Group Replication - Introduction
● Group Replication - Architecture
● Group Replication - Monitoring
● Group Replication - Modes
● Primary Member Change - Cases
● Primary Election Algorithm
● Conditions for using online UDF
● Communication Protocol
● Transaction Consistency
Group Replication - Introduction
● High Availability Solution
● To create a fault tolerant System.
● Supports Server side failover.
● Client side failover is not supported by GR.
● Distributed functionality.
● Based on the GCS protocol and paxos algorithm.
● Split brain issue is avoided by Quorum.
Group Replication - Introduction
Services of Group Replication:-
● Group Membership (VIEW)
● Failure Detection (Detect the failure & update the VIEW)
● Fault-tolerance ( QUORUM condition n = 2 x f + 1. )
● Monitoring ( performance schema tables )
All these Services are built into the GCS Protocol.
Group Replication - Architecture
Group Replication - Architecture
Functionality of Each Component:-
● Capture :Keep track of all the local transactions.
● Applier :Remote transactions.
● Recovery :Manage the distributed recovery.
● Replication :Define the replication protocol & handle the
conflict detection in the group.
● GCS & Xcom :GR Services & communication protocol.
Group Replication - ( Commit )
Group Replication - Monitoring
Tables in Perf schema:-
● replication_group_member_stats ( info about certification process)
● replication_group_members ( info about the group members )
● replication_connection_status ( info about the queue )
● replication_applier_status ( shows state of replication worker
thread )
Replication Channel:-
● group_replication_recovery - ( Channel for the recovery process)
● group_replication_applier - ( transactions from the other members
or from the group )
Group Replication - Monitoring
Group Replication Server States:-
● Online :will accept the connection from the client.
● Recovering :Applying the events from the donor.
● Offline :Member doesn’t belong to any group.
● ERROR :Member is in the group but not working properly.
“group_replication_exit_state_action”
● UNREACHABLE :It is mostly because of the network failure.
Group Replication - Modes
● Based on the variable - (group_replication_single_primary_mode)
● Single Primary Mode
○ One member accept the writes.
○ group_replication_enforce_update_everywhere_checks (off)
● Multi Primary Mode
○ All the members can accept the writes.
○ group_replication_enforce_update_everywhere_checks (ON)
Group Replication - Modes
● From MySQL version 8.0.13 we can change the modes in
online Using the UDF’s
○ group_replication_switch_to_single_primary_mode()
○ group_replication_switch_to_multi_primary_mode()
● From Version 8.0.13 to 8.0.16, no check for the safeguard.
● From Version 8.0.17, GR has safeguard check.
○ (i.e) Lower MySQL version member will become the
Primary.
Primary Member Change - Cases
● Primary leaves the group .
● While Changing the primary member manually using UDF.
● While Changing the multi primary to single primary.
Primary Election Algorithm
First Election Check:-
● Ordering based on MySQL major Version & patch Version.
Second Election Check:-
● Based on lowest member weight. ( group_replication_member_weight ).
Third Election Check:-
● Based on the lowest server UUID.
Conditions for using online UDF
1. All members must be in ONLINE state
2. No members can join in the group during a configuration change.
3. Only one configuration at once.
4. All members must be running MySQL 8.0.13 or higher
Communication Protocol
● From MySQL 8.0.16, Configure different versions of MySQL members.
● Group must use same communication protocol Version.
Reason:-
● From MySQL 5.7.14, allow compression of messages
● From MySQL 8.0.16, allow fragmentation of messages
Functions:-
● group_replication_get_communication_protocol();
● group_replication_set_communication_protocol(“version”);
Transaction Consistency.
● Controlled by group_replication_consistency variable.
○ EVENTUAL
○ BEFORE_ON_PRIMARY_FAILOVER
○ BEFORE ( RO trx wait for preceding trx to apply )
○ AFTER ( RW trx wait for preceding trx to apply in other members )
○ BEFORE_AND_AFTER
Email Us : Info@mydbops.com
Thank you

More Related Content

PDF
MySQL Group Replication
PPTX
Google Cloud Platform monitoring with Zabbix
PDF
MySQL Database Architectures - 2020-10
PDF
MySQL InnoDB Cluster and Group Replication in a Nutshell
PDF
OpenShift 4, the smarter Kubernetes platform
PDF
Lessons Learned: Troubleshooting Replication
PDF
[2018] MySQL 이중화 진화기
PDF
Red Hat OpenShift Container Platform Overview
MySQL Group Replication
Google Cloud Platform monitoring with Zabbix
MySQL Database Architectures - 2020-10
MySQL InnoDB Cluster and Group Replication in a Nutshell
OpenShift 4, the smarter Kubernetes platform
Lessons Learned: Troubleshooting Replication
[2018] MySQL 이중화 진화기
Red Hat OpenShift Container Platform Overview

What's hot (20)

PDF
Red Hat Enterprise Linux 8
PDF
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
PPTX
What is active directory
PPTX
Automate DBA Tasks With Ansible
PDF
Maximum Availability Architecture - Best Practices for Oracle Database 19c
PDF
MySQL Shell for DBAs
PDF
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShift
PDF
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
PDF
Oracle RAC 19c: Best Practices and Secret Internals
PDF
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
PPTX
openshift technical overview - Flow of openshift containerisatoin
PDF
Everything You Need to Know About MySQL Group Replication
PPTX
Apache Kafka Best Practices
PPTX
Oracleのソース・ターゲットエンドポイントとしての利用
PPTX
Understand oracle real application cluster
PDF
Mastering OpenStack - Episode 01 - Simple Architectures
PDF
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
PDF
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
PDF
GLPi v.10, les fonctionnalités principales et l'offre cloud
 
PDF
Architecture for building scalable and highly available Postgres Cluster
Red Hat Enterprise Linux 8
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
What is active directory
Automate DBA Tasks With Ansible
Maximum Availability Architecture - Best Practices for Oracle Database 19c
MySQL Shell for DBAs
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShift
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
Oracle RAC 19c: Best Practices and Secret Internals
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
openshift technical overview - Flow of openshift containerisatoin
Everything You Need to Know About MySQL Group Replication
Apache Kafka Best Practices
Oracleのソース・ターゲットエンドポイントとしての利用
Understand oracle real application cluster
Mastering OpenStack - Episode 01 - Simple Architectures
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
GLPi v.10, les fonctionnalités principales et l'offre cloud
 
Architecture for building scalable and highly available Postgres Cluster
Ad

Similar to Group Replication in MySQL 8.0 ( A Walk Through ) (20)

PDF
Sprint 71
PDF
AutoDOPandRest
PDF
What is new in Galera 4 ?
PDF
InnoDB Cluster Experience (MySQL User Camp)
PDF
Sprint 44 review
PDF
Customer Experience: InnoDB Cluster Implementation by PR Karthik
PPTX
Insight on MongoDB Change Stream - Abhishek.D, Mydbops Team
PDF
Introduction to mongo db
PPTX
Cloudify 4.2 Webinar - Agility & Control
PDF
MySQL Live Migration - Common Scenarios
PDF
Managing 600 instances
PDF
Heart of the SwarmKit: Store, Topology & Object Model
PDF
Sprint 68
PDF
MySQL Workbench for DFW Unix Users Group
PDF
SVCC-2014
PDF
Slack in the Age of Prometheus
PDF
Red Hat Advanced Cluster Manager Details
PDF
Scaling Monitoring At Databricks From Prometheus to M3
PDF
Sprint 50 review
PDF
PostgreSQL 9.5 - Major Features
Sprint 71
AutoDOPandRest
What is new in Galera 4 ?
InnoDB Cluster Experience (MySQL User Camp)
Sprint 44 review
Customer Experience: InnoDB Cluster Implementation by PR Karthik
Insight on MongoDB Change Stream - Abhishek.D, Mydbops Team
Introduction to mongo db
Cloudify 4.2 Webinar - Agility & Control
MySQL Live Migration - Common Scenarios
Managing 600 instances
Heart of the SwarmKit: Store, Topology & Object Model
Sprint 68
MySQL Workbench for DFW Unix Users Group
SVCC-2014
Slack in the Age of Prometheus
Red Hat Advanced Cluster Manager Details
Scaling Monitoring At Databricks From Prometheus to M3
Sprint 50 review
PostgreSQL 9.5 - Major Features
Ad

More from Mydbops (20)

PDF
Scaling TiDB for Large-Scale Application
PDF
AWS MySQL Showdown - RDS vs RDS Multi AZ vs Aurora vs Serverless - Mydbops...
PDF
Mastering Vector Search with MongoDB Atlas - Manosh Malai - Mydbops MyWebinar 39
PDF
Migration Journey To TiDB - Kabilesh PR - Mydbops MyWebinar 38
PDF
AWS Blue Green Deployment for Databases - Mydbops
PDF
What's New In MySQL 8.4 LTS Mydbops MyWebinar Edition 36
PDF
What's New in PostgreSQL 17? - Mydbops MyWebinar Edition 35
PDF
What's New in MongoDB 8.0 - Mydbops MyWebinar Edition 34
PDF
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
PDF
Read/Write Splitting using MySQL Router - Mydbops Meetup16
PDF
TiDB - From Data to Discovery: Exploring the Intersection of Distributed Dat...
PDF
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
PDF
Demystifying Real time Analytics with TiDB
PDF
Must Know Postgres Extension for DBA and Developer during Migration
PDF
Efficient MySQL Indexing and what's new in MySQL Explain
PDF
Scale your database traffic with Read & Write split using MySQL Router
PDF
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PDF
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
PDF
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
PDF
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Scaling TiDB for Large-Scale Application
AWS MySQL Showdown - RDS vs RDS Multi AZ vs Aurora vs Serverless - Mydbops...
Mastering Vector Search with MongoDB Atlas - Manosh Malai - Mydbops MyWebinar 39
Migration Journey To TiDB - Kabilesh PR - Mydbops MyWebinar 38
AWS Blue Green Deployment for Databases - Mydbops
What's New In MySQL 8.4 LTS Mydbops MyWebinar Edition 36
What's New in PostgreSQL 17? - Mydbops MyWebinar Edition 35
What's New in MongoDB 8.0 - Mydbops MyWebinar Edition 34
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Read/Write Splitting using MySQL Router - Mydbops Meetup16
TiDB - From Data to Discovery: Exploring the Intersection of Distributed Dat...
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
Demystifying Real time Analytics with TiDB
Must Know Postgres Extension for DBA and Developer during Migration
Efficient MySQL Indexing and what's new in MySQL Explain
Scale your database traffic with Read & Write split using MySQL Router
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Approach and Philosophy of On baking technology
PPTX
Cloud computing and distributed systems.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Encapsulation theory and applications.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Modernizing your data center with Dell and AMD
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
A Presentation on Artificial Intelligence
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Empathic Computing: Creating Shared Understanding
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Approach and Philosophy of On baking technology
Cloud computing and distributed systems.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Encapsulation theory and applications.pdf
MYSQL Presentation for SQL database connectivity
Network Security Unit 5.pdf for BCA BBA.
Modernizing your data center with Dell and AMD
Advanced methodologies resolving dimensionality complications for autism neur...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Per capita expenditure prediction using model stacking based on satellite ima...
A Presentation on Artificial Intelligence
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Digital-Transformation-Roadmap-for-Companies.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Empathic Computing: Creating Shared Understanding

Group Replication in MySQL 8.0 ( A Walk Through )

  • 1. Group Replication In MYSQL 8.0 A walk through Presented by VIGNESH PRABHU S www.mydbops.com info@mydbops.com
  • 2. About Mydbops ● Founded in 2015, HQ in Bangalore India with 450+ customer base across the globe. ● Mydbops is on Database Consulting with core specialization on MySQL ,MongoDB & PostgreSQL Administration and Support. ● We have expert team with 30+ certified DBA’s providing full time support and currently managing 300+ servers on cloud. ● Mydbops was created with a motto of developing a Devops model for Database administration offering 24*7 expert remote DBA support. ● We help organisations to architect and scale systems in MySQL/Mongo by implementing the advanced technologies in industry which are completely open source. ● We are a leading solution provider in the market for all sort of cloud based deployments and management.
  • 3. Agenda ● Group Replication - Introduction ● Group Replication - Architecture ● Group Replication - Monitoring ● Group Replication - Modes ● Primary Member Change - Cases ● Primary Election Algorithm ● Conditions for using online UDF ● Communication Protocol ● Transaction Consistency
  • 4. Group Replication - Introduction ● High Availability Solution ● To create a fault tolerant System. ● Supports Server side failover. ● Client side failover is not supported by GR. ● Distributed functionality. ● Based on the GCS protocol and paxos algorithm. ● Split brain issue is avoided by Quorum.
  • 5. Group Replication - Introduction Services of Group Replication:- ● Group Membership (VIEW) ● Failure Detection (Detect the failure & update the VIEW) ● Fault-tolerance ( QUORUM condition n = 2 x f + 1. ) ● Monitoring ( performance schema tables ) All these Services are built into the GCS Protocol.
  • 6. Group Replication - Architecture
  • 7. Group Replication - Architecture Functionality of Each Component:- ● Capture :Keep track of all the local transactions. ● Applier :Remote transactions. ● Recovery :Manage the distributed recovery. ● Replication :Define the replication protocol & handle the conflict detection in the group. ● GCS & Xcom :GR Services & communication protocol.
  • 8. Group Replication - ( Commit )
  • 9. Group Replication - Monitoring Tables in Perf schema:- ● replication_group_member_stats ( info about certification process) ● replication_group_members ( info about the group members ) ● replication_connection_status ( info about the queue ) ● replication_applier_status ( shows state of replication worker thread ) Replication Channel:- ● group_replication_recovery - ( Channel for the recovery process) ● group_replication_applier - ( transactions from the other members or from the group )
  • 10. Group Replication - Monitoring Group Replication Server States:- ● Online :will accept the connection from the client. ● Recovering :Applying the events from the donor. ● Offline :Member doesn’t belong to any group. ● ERROR :Member is in the group but not working properly. “group_replication_exit_state_action” ● UNREACHABLE :It is mostly because of the network failure.
  • 11. Group Replication - Modes ● Based on the variable - (group_replication_single_primary_mode) ● Single Primary Mode ○ One member accept the writes. ○ group_replication_enforce_update_everywhere_checks (off) ● Multi Primary Mode ○ All the members can accept the writes. ○ group_replication_enforce_update_everywhere_checks (ON)
  • 12. Group Replication - Modes ● From MySQL version 8.0.13 we can change the modes in online Using the UDF’s ○ group_replication_switch_to_single_primary_mode() ○ group_replication_switch_to_multi_primary_mode() ● From Version 8.0.13 to 8.0.16, no check for the safeguard. ● From Version 8.0.17, GR has safeguard check. ○ (i.e) Lower MySQL version member will become the Primary.
  • 13. Primary Member Change - Cases ● Primary leaves the group . ● While Changing the primary member manually using UDF. ● While Changing the multi primary to single primary.
  • 14. Primary Election Algorithm First Election Check:- ● Ordering based on MySQL major Version & patch Version. Second Election Check:- ● Based on lowest member weight. ( group_replication_member_weight ). Third Election Check:- ● Based on the lowest server UUID.
  • 15. Conditions for using online UDF 1. All members must be in ONLINE state 2. No members can join in the group during a configuration change. 3. Only one configuration at once. 4. All members must be running MySQL 8.0.13 or higher
  • 16. Communication Protocol ● From MySQL 8.0.16, Configure different versions of MySQL members. ● Group must use same communication protocol Version. Reason:- ● From MySQL 5.7.14, allow compression of messages ● From MySQL 8.0.16, allow fragmentation of messages Functions:- ● group_replication_get_communication_protocol(); ● group_replication_set_communication_protocol(“version”);
  • 17. Transaction Consistency. ● Controlled by group_replication_consistency variable. ○ EVENTUAL ○ BEFORE_ON_PRIMARY_FAILOVER ○ BEFORE ( RO trx wait for preceding trx to apply ) ○ AFTER ( RW trx wait for preceding trx to apply in other members ) ○ BEFORE_AND_AFTER
  • 18. Email Us : Info@mydbops.com Thank you