Group Replication is know as an up to date HA(High Availablity) solution which is supported in official version of MySQL 5.7 since Dec. 2016.It's similar with the other two tools —— MHA(By Yoshinorim) & PXC(By Percona),but not as same as them. Group Replication(I'll call it MGR later) provides features below:
 
  • high consistency
 
    MGR protocol lies on the algorithm of Paxos(Which is a kind of consensus protocol usually be used in distributed system and presented by Mr.Lamport.) to guarantee data consistency.What's Paxos?There's something about it below:
    Mr Lamport's introduction on wiki: https://en.wikipedia.org/wiki/Leslie_Lamport
    MGR provides a built-in membership 

service which can strongly coordinate the servers in the same group to do switchover between master and slave automatically with high efficiency and strong consistency.All members in the same group will communicate with each other from time to time by GSC protocols.The group members always come up to an agreement in an order of global transaction sequence in order to decide whether to commit or abort transactions when commit operations happen.
 
  • high flexibility
    
    MGR supports both single-primary and multi-primary mode.In the single-primary mode,there's a machenism called "primary election" automatically while failure is detected and only the primary server can update data simultanuously.In the multi-primary mode,update can be done on all the servers in the group even though they update data concurrently.You can choose the appropriate way to implement your MySQL Servers.
 
  • high fault-tolerance
    

   Only if most of your servers crash,the service will continuously proceed.There's an "failure detector" machenism when fault occurs or the servers in group don't get privilege to update data.that also prevents "brain-split" when one member cannot communicate with others in the same group(Which usually caused by network failure or something else). it's recommended to implement MGR with three server at least,as the number of tolerance depend on the formula:n=2*f+1.For instance,there's five members in the MGR group,so the tolerance is two.
 
  • high scalability

      One server in group can be replicated from another one automatically until it become equal when adding or removing it.MGR will maintain a view which contains informations about these group members if they changes,All the members join or leave the group voluntarilly or not will dynamically reconfigure the view.
       
    In order to distinguish MGR and traditional replication technology,let's see the pictures below:
 
Asynchronous Replication:

Semisynchronous Replication(after_sync):


    From the above two pictures,we can see that there's no HA function in the master-slave traditional replication(both asyn mode and semisync mode).whenever the master crashes,the service won't be available anymore.
    In most scenarios,master has one or more slaves.Commits of transactions take place merely on the master.Binlogs are transited(asynchronously).Each server has a full copy of data 'cause it shares nothing here.
Group Replication(multi-primary):
 

    Above is the multi-primary mode of MGR,There're something diffrerent such as "certify" and "consensus" in the picture.The consensus based on paxos make sure the consistencies between the masters.but it's still a shared-nothing replication the same as the classical replication. 

    Notice,in multi-primary mode,all ther masters can execute transactions and commit independently,if there's a confilct(which always happens in the certification procedure),for example,they want to update the same row of one table,only one master who has the earlier golobal transaction sequence will get the privilege to finish the operation(what seems like first commit win principle).
 
Summary:
  • Be compared with MHA & PXC,MGR is the newest supplement in MySQL high availability family.
  • There're still few case using MGR to implement in product system nowadays.
  • MySQL Servers don't need to failover but the application does.
  • The practical usage of MGR is together with some middleware product such as ProxySQL.

浅析MySQL 5.7组复制技术(Group Replication)的更多相关文章

  1. MySQL Group Replication 搭建[Multi-Primary Mode]

    1. 环境准备 CentOS7.3 percona-server-5.7.18-14 两台服务器ip地址和主机名 10.0.68.206 yhjr-osd-mysql01-uat 10.0.68.20 ...

  2. MGR(MySQL Group Replication)部署测试

    1. 环境说明 192.168.11.131 mgr1 主节点 192.168.11.132 mgr2 从节点 192.168.11.133 mgr3 从节点 2. 在mgr1.mgr2.mgr3上安 ...

  3. Docker Images for MySQL Group Replication 5.7.14

    In this post, I will point you to Docker images for MySQL Group Replication testing. There is a new ...

  4. Mysql 5.7 基于组复制(MySQL Group Replication) - 运维小结

    之前介绍了Mysq主从同步的异步复制(默认模式).半同步复制.基于GTID复制.基于组提交和并行复制 (解决同步延迟),下面简单说下Mysql基于组复制(MySQL Group Replication ...

  5. Mysql Group Replication 简介及单主模式组复制配置【转】

    一 Mysql Group Replication简介    Mysql Group Replication(MGR)是一个全新的高可用和高扩张的MySQL集群服务.    高一致性,基于原生复制及p ...

  6. MySQL Group Replication 技术点

    mysql group replication,组复制,提供了多写(multi-master update)的特性,增强了原有的mysql的高可用架构.mysql group replication基 ...

  7. MySQL高可用之组复制(1):组复制技术简介

    MySQL组复制系列文章: MySQL组复制大纲 MySQL组复制(1):组复制技术简介 MySQL组复制(2):配置单主模型的组复制 MySQL组复制(3):配置多主模型的组复制 MySQL组复制( ...

  8. MySQL高可用之组复制技术(2):配置单主模型的组复制

    MySQL组复制系列文章: MySQL组复制大纲 MySQL组复制(1):组复制技术简介 MySQL组复制(2):配置单主模型的组复制 MySQL组复制(3):配置多主模型的组复制 MySQL组复制( ...

  9. MySQL group replication介绍

    “MySQL group replication” group replication是MySQL官方开发的一个开源插件,是实现MySQL高可用集群的一个工具.第一个GA版本正式发布于MySQL5.7 ...

随机推荐

  1. sql-syscolumns,INFORMATION_SCHEMA.columns,sysobjects

    //计算表tb_Blog的字段个数 select count(*) from syscolumns where id=object_id('tb_Blog') 获取指定表的所有字段和字段类型 SELE ...

  2. 【转】R树空间索引

    R树在数据库等领域做出的功绩是非常显著的.它很好的解决了在高维空间搜索等问题.举个R树在现实领域中能够解决的例子吧:查找20英里以内所有的餐厅.如果没有R树你会怎么解决?一般情况下我们会把餐厅的坐标( ...

  3. QLocalServer和QLocalSocket单进程和进程通信

    QLocalServer 继承自QObject. QLocalServer提供了一个基于本地套接字(socket)的服务端(server).QLocalServer可以接受来自本地socket的连接. ...

  4. C#MD5笔记

    在这里简单记录一下md5加密的方式 代码如下,请自行封装: static void Main(string[] args) { "); Console.WriteLine(s); Conso ...

  5. web images

    ps切图时,我们保存时会要求选择文件格式. 一般来说,如果图像的色彩丰富,没有透明度的要求,则选择为jpeg格式: 如果图像色彩不丰富,我们就选择为png-8的格式,注意:ps中要选择无杂边,无仿色 ...

  6. React - React Developer Tools开发者工具的安装与使用(Chrome调试插件)

    原文地址:http://www.cnplugins.com/zhuanti/how-to-use-react-tools.html 虽然我们曾经在React开发者工具的基础介绍里面有概括性的介绍过Re ...

  7. 动态给table添加动态航

    <html> <head> <title>usually function</title> <meta http-equiv="Cont ...

  8. 纯CSS画的基本图形

    图形包括基本的矩形.圆形.椭圆.三角形.多边形,也包括稍微复杂一点的爱心.钻石.阴阳八卦等.当然有一些需要用到CSS3的属性,所以在你打开这篇文章的时候,我希望你用的是firefox或者chrome, ...

  9. Python学习---重点模块之logging

    日志级别 日志级别  critical > error > warning > info > debug, 默认是从warning开始打印 import logging # 日 ...

  10. 对std::map进行排序

    1.对Key排序. std::map的第三个参数即为对key进行排序的比较函数.默认为less,表示升序.如果要降序,可以改为greater. 2.对Value排序 不支持,因为map不是一个序列的容 ...