MySQL group replication (1): Introduction to Group Replication technology

Source: Internet
Author: User
Tags percona

1.MySQL High-availability backgrounds

The master-slave replication of a database is a useful feature, but it is difficult to ensure its high availability. Implements MySQL master-slave replication high-availability tools, common are:

    • (1). MMM: Eliminated, there are some problems in consistency and high concurrency stability.
    • (2). MHA: Some people still use, but there are some problems, but also tend to be eliminated MySQL master-slave high-availability program.
    • (3). Galera: Leading the era of master-slave replication high-availability technology.
    • (4). MariaDB Galera cluster:mariadb The realization of Galera.
    • (5). Pxc:percona XtraDB Cluster, is Percona to Galera self realization, uses the person seems many.
    • (6). Gr:group Replication,mysql officially provides the group replication technology (the technology introduced by MySQL 5.7.17), based on the Paxos algorithm.
      • MariaDB Galera Cluster, PXC, GR are similar, each has advantages. But GR is revolutionary, based on native replication technology, which is rumored to be superior to PXC in many ways.

However, each of the above high-availability implementations has the disadvantage that even MMM automates the simulation of highly available environments through Perl scripts. To Galera, this is a trend-setting, high-availability technology that focuses on InnoDB storage engines with transactional characteristics, Percona and MariaDB each implement their own Galera technology: MariaDB galera cluster and Percona XtraDB Cluster. MySQL did not launch its own galera, but in 2016 MySQL 5.7.17 released the group Replication, which is the set of replication technology.

There is a lot of comparison between the group replication and Galera, especially the 2016 group copy of the "Galera will Die" speech, but in fact, there are still many people using PXC, after all, it has been sailing for many years, and GR only haunt how long, The first few versions have been tinkering. So, GR or Galera, that‘s a question .

Say a lot of nonsense, or enter the text: the MySQL group replication technology Introduction.

2. What is MGR?

MGR (MySQL Group Replication) is the MySQL official in MySQL 5.7.17 version of the master-slave replication high-availability technology, which is based on the native master-slave replication, the nodes are grouped into a group, through the intra-Group node communication negotiation ( The Group communication protocol is based on Paxos algorithm, which realizes strong data consistency, fault detection, collision detection, node addition group, node off group and so on.

For example, a group with 3 nodes:

The 3 nodes communicate with each other, propagate the event to the other node whenever an event occurs, and then negotiate that if most of the nodes agree to this event, the event will pass, otherwise the event will fail or roll back.

These nodes can be single-master models (Single-primary) or multi-master models (multi-primary). Single master model only one master node can accept the write operation, the primary node can be automatically elected when the master node fails. Under the multi-master model, all nodes can accept write operations, so there is no master-slave concept.

That's it, it's done.

MySQL group replication (1): Introduction to Group Replication technology

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.