1 管理节点部署位置1.1. Dedicated Manager server and multiple MySQL (master,slaves) servers 使用专用的管理服务

1 管理节点部署位置

1.1. Dedicated Manager server and multiple MySQL (master,slaves) servers

使用专用的管理服务器管理多组MySQL主从服务器

Since MHA Manager uses very little CPU/Memory resources, you can manage lots of (master, slaves) pairs from single MHA Manager. It is even possible to manage 100+ pairs from single manager server.

1.2. Running MHA Manager on one of MySQL slaves

在一个从库上部署管理节点

If you have only one (master, slaves) pair, you may not like allocating dedicated hardware for MHA Manager because it adds relatively high costs. In such cases, running MHA Manager on one of slaves makes sense. Note that current version of MHA Manager connects to MySQL slave server via SSH even though the MySQL server is located on the same host as MHA Manager, so you need to enable SSH public key authentication from the same host.

2 不同主从配置下的主从切换场景

2.1 Single master, multiple slaves(单主多从)

M(RW) M(RW), promoted from S1 | | +------+------+ --(master crash)--> +-----+-----+ S1(R) S2(R) S3(R) S2(R) S3(R)This is the most common replication settings. MHA works very well here.

2.2 Single master, multiple slaves (one on remote datacenter) 单主多从,一个从位于远程数据中心

M(RW) M(RW), promoted from S1 | | +------+---------+ --(master crash)--> +-----+------+ S1(R) S2(R) Sr(R,no_master=1) S2(R) Sr(R,no_master=1)In many cases you want to deploy at least one slave server on a remote datacenter. When the master crashes, you may not want to promote the remote slave to the new master, but let one of other slaves running on the local datacenter become the new master. MHA supports such requirements. Setting no_master=1 in the configuration file makes the slave never becomes new master.

2.3 Single master, multiple slaves, one candidate master(单主多从,一个候选主)

M(RW)-----S0(R,candidate_master=1) M(RW), promoted from S0 | | +----+----+ --(master crash)--> +----+----+ S1(R) S2(R) S1(R) S2(R)In some cases you may want to promote a specific server to the new master if the current master crashes. In such cases, setting candidate_master=1 in the configuration file will help.

2.4 Multiple masters, multiple slaves(多主多从)

M(RW)M2(R,candidate_master=1) M(RW), promoted from M2 | | +----+----+ --(master crash)--> +----+----+ S(R) S2(R) S1(R) S2(R)In some cases you may want to use multi-master configurations, and you may want to make the read-only master the new master if the current master crashes. MHA Manager supports multi-master configurations as long as all non-primary masters (M2 in this figure) are read-only.

2.5 Three tier replication(三层复制架构)

M(RW) M(RW), promoted from S1 | | +------+---------+ --(master crash)--> +-----+------+ S1(R) S2(R) Sr(R) S2(R) Sr(R) | | + + Sr2 Sr2In some cases you may want to use three-tier replication like this. MHA can still be used for master failover. In the configuration file, manage the master and all second-tier slaves (in this figure, add M,S1,S2 and Sr in the MHA config file, but do not add Sr2). If the current master (M) fails, MHA automatically promotes one of the second-tier slaves(S1,S2,Sr, and you can also set priorities) to the new master, and recover the rest second-tier slaves. The third tier slave(Sr2) is not managed by MHA, but as long as Sr (Sr2's master) is alive, Sr2 can continue replication without changing anything.

本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉

本文系统来源:php中文网

mysql 使用场景_MySQLMHA典型使用场景相关推荐

  1. webworker应用场景_典型应用场景 · OpenResty最佳实践-最新版 · 看云

    # 典型应用场景 可以这样说,任何一个开发语言.开发框架,都有它存在的明确目的,重心是为了解决什么问题.没有说我们学习一门语言或技术,就可以解决所有的问题.同样的,`OpenResty`的存在也有其自 ...

  2. Zookeeper分布式一致性原理(八):Zookeeper典型应用场景

    1. 简介 Zookeeper是一个高可用的分布式数据管理和协调框架,并且能够很好的保证分布式环境中数据的一致性.在越来越多的分布式系统(Hadoop.HBase.Kafka)中,Zookeeper都 ...

  3. B树、B+树、LSM树以及其典型应用场景

    前言 动态查找树主要有:二叉查找树.平衡二叉树.红黑树.B树.B+树.前面三种是典型的二叉查找树,查找的时间复杂度是O(log2N)与树的深度有关系,那么降低树的深度也就可以提升查找效率.这时就提出了 ...

  4. SSIS典型应用场景分析

    SSIS典型应用场景分析 SSIS 提供一系列支持业务应用程序开发的内置任务.容器.转换和数据适配器,方便我们创建解决方案来解决复杂的业务问题,除了可以管理 SQL Server 数据库以及在 SQL ...

  5. 基于星环TDH数据仓库典型总和场景数据流转设计

    典型综合场景数据流转设计 综合场景一 T+1数据加工 图 4 T+1方式数据流转 T+1是数据仓库领域最为常见的数据集成模式,T+1模式下数据仓库会在每天固定时间点采集当天或者前一天交易系统数据. 根 ...

  6. DaemonSet 典型应用场景 - 每天5分钟玩转 Docker 容器技术(129)

    Deployment 部署的副本 Pod 会分布在各个 Node 上,每个 Node 都可能运行好几个副本.DaemonSet 的不同之处在于:每个 Node 上最多只能运行一个副本. DaemonS ...

  7. ZooKeeper典型应用场景一览

    原文地址:http://jm-blog.aliapp.com/?p=1232 ZooKeeper典型应用场景一览 数据发布与订阅(配置中心) 发布与订阅模型,即所谓的配置中心,顾名思义就是发布者将数据 ...

  8. Alluxio及其典型应用场景

     一.简介 Alluxio号称是世界上第一个内存级虚拟分布式存储系统,是计算与存储间的桥梁. 二.典型应用场景 1. 计算层需要反复访问远程(比如在云端,或跨机房)的数据: 2. 计算层需要同时访问多 ...

  9. 【ZooKeeper Notes 28】ZooKeeper典型应用场景一览

    ZooKeeper是一个高可用的分布式数据管理与系统协调框架.基于对Paxos算法的实现,使该框架保证了分布式环境中数据的强一致性,也正是基于这样的特性,使得ZooKeeper解决很多分布式问题.网上 ...

最新文章

  1. Windows App开发之集成设置、帮助、搜索和共享
  2. 使用镀锌铁皮制作负阻器件
  3. php 清除之前echo_PHP入门读书笔记(三): 常量和变量
  4. vue手机端回退_华为官方教程:以 P40 为例,鸿蒙 OS 2.0 Beta 版本回退到 EMUI 11 稳定版...
  5. ES6的新特性----Vue学习必备基础知识
  6. Blackberry阻碍因素
  7. int、unsigned int、float、double 和 char 在内存中存储方式
  8. Consul入门04 - Consul集群 1
  9. found.000文件夹的问题
  10. java android aes加密解密_AES加密解密在JAVA和ANDROID下互通
  11. Spring教程 - Spring核心框架教程
  12. 专注是最好的修行,一个80后IT从业者14年的成长与感悟
  13. VB6(Fast Report Studio 4.6.80)
  14. Spring MVC Interceptor
  15. 大数据时代 集群NAS更给力
  16. restlet client插件下载
  17. 【pyqt5学习】——pyqt5中.qrc资源文件的创建与编写
  18. App、H5、PC应用多端开发框架Flutter 2发布
  19. 最新30个优秀的网站设计作品欣赏
  20. 最新Tomcat安装及配置教程+JavaWeb项目部署

热门文章

  1. Redis 6.0 新特性:多线程连环 13 问!
  2. 京东技术全景图首次展示 四大重磅智能技术驱动产业未来
  3. 拒修电脑后,妹子又约我学机器学习,好烦(甜)!
  4. 云存储精华问答 | 云存储的优势在哪?
  5. 请重视!服务器这几个“异常”可能性预警
  6. 简单的二次封装axios中的get,post方法
  7. 电脑两边黑边怎么还原_Mac电脑录制的视频有黑边?如何解决
  8. mysql bin oct_python 讲解进制转换 int、bin、oct、hex
  9. linux ubuntu php,linux ubuntu安装php运行环境
  10. wamp php5.6 mysql5.6,WampServer 3.0.6 多语言版 集成apache2.4.23 mysql5.7.14 php5.6.25-7.0.10 穿墙书店...