Reliabilityswitchoverpromotion

Failover

Definition

Failover is the process of detecting that a primary component has failed and redirecting traffic or promoting a standby so service continues.

In practice

Failover has three parts: detecting the failure, choosing and promoting a replacement, and redirecting clients. Each takes time, so total recovery time is often tens of seconds even when fully automated.

The dangerous cases are false positives and split brain, where the old primary is still alive and both accept writes. Fencing, consensus-based leader election and regular failover drills keep failover safe.

Example

When a database primary stops answering health checks for 30 seconds, the cluster manager promotes the most up-to-date replica and updates the DNS record clients connect to.