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