Failover.
also: failovers · automatic failover · fail over · promote a replicaReplacing a failed primary: followers notice missed heartbeats, a new primary is promoted and clients are pointed at it.
the two-minute refresher
- Detect (heartbeats time out after 10-30 s), elect a new primary, repoint connections.
- Writes fail during the window (10-60 s): return errors, queue them, or make failover fast.
- With async replication the newest writes may be lost on promotion.
- The old primary must be fenced, or you get split brain.