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. Android Button事件处理

    一般只需要处理按钮的点击事件就可以,但想让一个按钮处理多个事件,就得同时监听多个方法. OnClickListener  点击事件 OnLongClickListener 长按事件 OnTouchLi ...

  2. 面向对象之property

    property功能 以调用数据属性的方式(不用加括号)调用方法 方法定义成数据属性(方法本应该是动词) # 定义property之前 class People: def __init__(self, ...

  3. Ten C++11 Features Every C++ Developer Should Use

    原版:http://www.codeproject.com/Articles/570638/Ten-Cplusplus-Features-Every-Cplusplus-Developer 译版:ht ...

  4. c#编程指南(三) 泛型委托(Generic Delegate)

    泛型委托实际上就是一个.NET Framework预定义的委托,基本涵盖了所有常用的委托,所以一般不用用户重新声明啦. 很简单,看下面简单的小例子: //void method(); Action t ...

  5. 爬虫入门之Scrapy框架基础框架结构及腾讯爬取(十)

    Scrapy终端是一个交互终端,我们可以在未启动spider的情况下尝试及调试代码,也可以用来测试XPath或CSS表达式,查看他们的工作方式,方便我们爬取的网页中提取的数据. 如果安装了 IPyth ...

  6. Docker_2 常用命令

    Docker的组成 容器与镜像 docker常用命令 辅助信息 Docker的组成 Docker Daemon Docker Client Docker Hub 使用Docker Client时,输入 ...

  7. Mysql学习---视图/触发器/存储过程/函数/执行计划/sql优化 180101

    视图 视图: 视图是一个虚拟表(非真实存在),动态获取数据,仅仅能做查询操作 本质:[根据SQL语句获取动态的数据集,并为其命名],用户使用时只需使用[名称]即可获取结果集,并可以将其当作表来使用.由 ...

  8. 小技巧:Mac下Metasploit渗透Oracle环境的搭建

    Metasploit是一款开源的安全漏洞检测工具,可以帮助安全和IT专业人士识别安全性问题,验证漏洞的缓解措施,并管理专家驱动的安全性进行评估,提供真正的安全风险情报.这些功能包括智能开发,密码审计, ...

  9. 10个出色的NoSQL数据库(转)

    随着大数据的不断发展,非关系型的数据库现在成了一个极其热门的新领域,非关系数据库产品的发展非常迅速.现今的计算机体系结构在数据存储方面要有庞大的水平扩展性,而NoSQL也正是致力于改变这一现状.目前G ...

  10. The Tao to Excellent

    1:一次只做一件事情 我不具备同时做好多件事情的能力. 2:随身携带一本书 效率最高的学习时间是那些零碎的时间. 3:听身体的 休息的标准是:如果你觉得你是在休息,那你就是在休息了. 4:如果有一件事 ...