Export to GitHub

mysql-master-ha - issue #92

is it necessary for setting this parameter "secondary_check_script" in the one and same LAN ?


Posted on Aug 1, 2014 by Grumpy Wombat

In general, it is highly recommended to have two or more network routes to check MySQL master server availability. secondary_check_script = masterha_secondary_check -s remote_host1 -s remote_host2

My question as follows: If all my machine(mysql master,mysql slave ,MHA manager) are in the one and the same LAN , is it necessary for setting this parameter?

I think it is not necessary. I have to make sure that remote_host1 and remote_host2 are alive ,if one is dead,at the same time the master node is dead ,MHA failover will not be successful because mha manager can not login the remote_host .

What is your opinion about it?

Comment #1

Posted on Aug 2, 2014 by Grumpy Bear

Main purpose of the secondary_check_script is to avoid split brain. Suppose there are one master and three slaves, master is in rack1 and slaves are in rack 2,3,4. If rack1 is down but master itself is running, MHA decides master is dead and starts failover, but if rack1 recovers, there is a risk that applications send write traffics to the old master. You need to make sure this scenario does not happen. secondary_check_script helps here, by setting -s some_host_in_rack_1. In that case MHA fails to connect to the remote host and does not start failover. Failover does not start, but this is much better than split brain.

Comment #2

Posted on Aug 4, 2014 by Grumpy Wombat

Thank your detail explanation,and it have enhanced my understanding of this parameter. Thanks again!

Status: New

Labels:
Type-Defect Priority-Medium