Keepalived configuration – To set MASTER/BACKUP or EQUAL

haproxykeepalivedload balancing

Now this is something which has been on my mind since I started stetting up our load balancers.

Would you use the MASTER/BACKUP configurations for keepalived if both your HAProxy servers were the same hardware specs?

Or, would you use the EQUAL state?

Why I ask is, in my mind at least It seems more detrimental to have the LBs switch on a fail over and then back to the original master… as opposed to if using the EQUALS state the active LB is the one it switched to during the fail over

Best Answer

If the cluster members are of the same specs (no machine is much better in terms of hardware over the other), I would prefer to keep the current master without failing back to the original master. At least, this will save the current sessions/transactions during the original master recovery and there will be no real benefit as the two machines are identical.