MySQL MHA 典型使用场景(2)

If Sr crashes, Sr2 can't continue replication because Sr2's master is Sr. MHA can NOT be used to recover Sr2. This is where support for global transaction id is desired. Hopefully this is less serious than master crash.


2.6        Three tier replication, multi-master(三层复制架构,多主)
  M1(host1,RW) <-----------------> M2(host2,read-only)        |                                |  +-----+--------+                      + S1(host3,R)    S2(host4,R)            S3(host5,R)=> After failover

M2(host2,RW)

|

+--------------+--------------------------+

S1(host3,R)    S2(host4,R)            S3(host5,R)

This structure is also supported. In this case, host5 is a third-tier slave, so MHA does not manage host5(MHA does not execute CHANGE MASTER on host5 when the primary master host1 fails). When current master host1 is down, host2 will be new master, so host5 can keep replication from host2 without doing anything. Here are configuration file example.

[server default]
multi_tier_slave=1

[server1]
hostname=host1
candidate_master=1

[server2]
hostname=host2
candidate_master=1

[server3]
hostname=host3

[server4]
hostname=host4

[server5]
hostname=host5

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/4decfac87b78b431db9da7c40e1230f4.html