Problem
A single instance of a stateful or singleton component is a single point of failure. Running two actives may be impossible because of write conflicts or licensing, but downtime during manual recovery is unacceptable.
Also known as: hot-standby, primary-standby
Maintain a standby replica that takes over serving when the active primary fails.
A single instance of a stateful or singleton component is a single point of failure. Running two actives may be impossible because of write conflicts or licensing, but downtime during manual recovery is unacceptable.
In active-passive failover one node does the work while another waits. It trades idle capacity for a simple consistency story, since only one node ever accepts writes.
Replication keeps the standby current, and a detector watches the primary.
clients -> VIP -> [primary] --replicate--> [standby]
primary stops heartbeats
1. detector confirms (quorum)
2. fence old primary (STONITH or token)
3. promote standby, move VIP
4. old primary rejoins as standby
Synchronous replication avoids data loss but adds latency and can block writes if the standby is down. Asynchronous replication keeps writes fast but may lose the last few transactions. Tools such as Patroni, Pacemaker, and cloud managed databases implement this loop.
Medium to high, idle standby duplicates infrastructure
Medium, failover drills and monitoring
Medium, split-brain reasoning
Split brain when both nodes accept writes
Standby is stale or misconfigured and fails to take over
Failover flaps between nodes during partial network failure