replication-manager
replication-manager copied to clipboard
about the election of slave nodes
Assuming Master (172.22.8.11:3306) has two slave nodes, SlaveA (172.22.8.12:3306) and SlaveB (172.22.8.13:3306)
RM configuration is as follows:
db-servers-hosts = "172.22.8.11:3306,172.22.8.12:3306,172.22.8.13:3306"
db-servers-prefered-master = "172.22.8.11:3306"
If Master (172.22.8.11:3306) goes down, which node will be elected as the new master? Can it be manually specified?
The node that will be elected as master is the most up to date one , chosen inside de not ignored list. when equal than it is ordered by 2 extra parameters the prefered ones t and by scoring of availability regarding replication and availability. Of you only chose one prefered then it will choose. this is for failover but for switchover any server can be elected just play with prefered also i think we can force a failover but in such case there is good chance you loose TRXs and you may have to resync the old master and some slaves that may be ahead of the new leader
Prefered and ignored are list does not need to be unique
Please reopen if not clear, check for the various log levels there is one that print the election matrice to help user understand the election process