Pick the fix
A two-node database pair keeps failing over and sometimes both nodes accept writes. Best fix?
Hint 1 of 1
With two nodes, who breaks a tie?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Add a third voter (witness) so promotion needs a majority, and fence the old primary
Correct. A majority stops both sides from deciding alone; fencing stops the old one writing.
With two nodes, neither can tell a dead peer from a broken link, so both may promote themselves. A third voter means promotion needs 2 of 3 votes, and fencing stops the old primary writing.
Why not the others?
- B Shorten heartbeat timeouts. More false failovers.
- C Add a load balancer health check. The balancer can't tell partitioned from dead either.
- D Make replication asynchronous. Doesn't address who's primary.