replication-manager icon indicating copy to clipboard operation
replication-manager copied to clipboard

about the election of slave nodes

Open tanglu86 opened this issue 11 months ago • 2 comments

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?

tanglu86 avatar Mar 04 '24 08:03 tanglu86

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

svaroqui avatar Mar 04 '24 08:03 svaroqui

Prefered and ignored are list does not need to be unique

svaroqui avatar Mar 04 '24 08:03 svaroqui

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

svaroqui avatar Jul 09 '24 14:07 svaroqui