MySQL Group Replication:
Group Replication:
It is a plugin build on existing Mysql replication infrastructure features such as binary log, row-based logging, and global transaction identifiers. Group replication is not a regular point-to-point connection, as in classical Replication, but rather a different paradigm: Group Communication. It is a classic modular and layered piece of software, and communication module - Group communication API and Corosync up to MySQL Group Replication 0.5.0.
Group replication plugin:
Consists of API- Capture / Apply / Life cycle, Capture, Applier, Recovery, Replication protocol logics, Group communication system API, Group Communication Engine (Paxos variant), Mencius. It is Paxos-based solution, named eXtended COMmunications, or simply XCOM, which is a key component in the MySQL Group Replication.Key functionalities of XCOM are Order Delivery, Dynamic Membership, and Failure detection.
Paxos is probably the most well known consensus protocol and works in two phases.
Set of APIs:
Set of APIs for capture, apply, and lifecycle, which control how the plugin interacts with MySQL Server.
Interfaces:
Interfaces, which make information flow from the server to the plugin such as notifications for events such as the server starting, the server recovering, the server being ready to accept connections, and the server being about to commit a transaction,and plugin to the server, instructs the server to perform actions such as committing or aborting ongoing transactions, or queuing transactions in the relay log.
The applier component execute remote transactions on the database
The recovery component manages distributed recovery, and get a server that is joining the group up to date by selecting the donor, orchestrating the catch up procedure and reacting to donor failures.
The replication protocol module contains the specific logic of the replication protocol. It handles conflict detection, and receives and propagates transactions to the group.
The Group Communication System (GCS) API, a high level API that abstracts the properties required to build a replicated state machine Paxos-based group communication engine (XCom) handles communications with the members of the replication group
Group Membership service:
Group Membership service is aware of the groups members in any moment in time, allow a member to Join and Leave a group, informing all the interested parties of that event.
Total Order broadcast primitive service - allows for a member to send a message to a Group and ensure that, if one member receives the message, then all members receive it, also guarantees that all messages arrive in the same order in all members that belong to a Group.
Group communication model:
https://dev.mysql.com/doc/refman/8.0/en/group-replication-plugin-architecture.html
http://mysqlhighavailability.com/group-communication-behind-the-scenes/
https://dev.mysql.com/worklog/task/?id=8793
Explore Pacemaker and Corosync:
https://www.lisenet.com/2016/activepassive-mysql-high-availability-pacemaker-cluster-with-drbd-on-centos-7/
https://www.digitalocean.com/community/tutorials/how-to-create-a-high-availability-setup-with-corosync-pacemaker-and-floating-ips-on-ubuntu-14-04
http://blog.ulf-wendel.de/2013/mini-poc-using-a-group-communication-system-for-mysql-ha/
http://corosync.github.io/corosync/
https://mysqlhighavailability.com/mysql-group-replication-a-small-corosync-guide/
Group Replication v/s Galera:
https://dzone.com/articles/the-quest-for-better-mysql-replication-galera-vs-group-replication
Group Replication:
It is a plugin build on existing Mysql replication infrastructure features such as binary log, row-based logging, and global transaction identifiers. Group replication is not a regular point-to-point connection, as in classical Replication, but rather a different paradigm: Group Communication. It is a classic modular and layered piece of software, and communication module - Group communication API and Corosync up to MySQL Group Replication 0.5.0.
Group replication plugin:
Consists of API- Capture / Apply / Life cycle, Capture, Applier, Recovery, Replication protocol logics, Group communication system API, Group Communication Engine (Paxos variant), Mencius. It is Paxos-based solution, named eXtended COMmunications, or simply XCOM, which is a key component in the MySQL Group Replication.Key functionalities of XCOM are Order Delivery, Dynamic Membership, and Failure detection.
Set of APIs:
Set of APIs for capture, apply, and lifecycle, which control how the plugin interacts with MySQL Server.
Interfaces:
Interfaces, which make information flow from the server to the plugin such as notifications for events such as the server starting, the server recovering, the server being ready to accept connections, and the server being about to commit a transaction,and plugin to the server, instructs the server to perform actions such as committing or aborting ongoing transactions, or queuing transactions in the relay log.
- A Control interface that will allow a member to manage its status within a group with primitives like Join, Leave and callbacks to View Membership information.
- A Message interface that allows a member to send and receive messages.
- A Statistics interface to store and extract information about the Group and Messages.
The applier component execute remote transactions on the database
The recovery component manages distributed recovery, and get a server that is joining the group up to date by selecting the donor, orchestrating the catch up procedure and reacting to donor failures.
The replication protocol module contains the specific logic of the replication protocol. It handles conflict detection, and receives and propagates transactions to the group.
The Group Communication System (GCS) API, a high level API that abstracts the properties required to build a replicated state machine Paxos-based group communication engine (XCom) handles communications with the members of the replication group
Group Membership service:
Group Membership service is aware of the groups members in any moment in time, allow a member to Join and Leave a group, informing all the interested parties of that event.
Total Order broadcast primitive service - allows for a member to send a message to a Group and ensure that, if one member receives the message, then all members receive it, also guarantees that all messages arrive in the same order in all members that belong to a Group.
- join() - Used by new node to enter a group
- leave() - Used when node decide to leave
Group communication model:
- It has a C API.
- It is proven and deployed solution, for instance, in Pacemaker and Apache Qpid.
https://dev.mysql.com/doc/refman/8.0/en/group-replication-plugin-architecture.html
http://mysqlhighavailability.com/group-communication-behind-the-scenes/
https://dev.mysql.com/worklog/task/?id=8793
Explore Pacemaker and Corosync:
https://www.lisenet.com/2016/activepassive-mysql-high-availability-pacemaker-cluster-with-drbd-on-centos-7/
https://www.digitalocean.com/community/tutorials/how-to-create-a-high-availability-setup-with-corosync-pacemaker-and-floating-ips-on-ubuntu-14-04
http://blog.ulf-wendel.de/2013/mini-poc-using-a-group-communication-system-for-mysql-ha/
http://corosync.github.io/corosync/
https://mysqlhighavailability.com/mysql-group-replication-a-small-corosync-guide/
Group Replication v/s Galera:
https://dzone.com/articles/the-quest-for-better-mysql-replication-galera-vs-group-replication
Comments
Post a Comment