Skip to content

How to implement failover well

Automate it, test it regularly, avoid split-brain, and have a failback plan.

Failover that does not turn into an incident

  1. Automate detection and switch

    Manual failover is minutes to hours; automated is seconds. Health checks must be smarter than "ping responded".

  2. Prevent split-brain

    Use quorum or a leader election (Raft, etcd, Consul). Two primaries with stale data is worse than one primary down.

  3. Failback is a separate operation

    Failback after failover is a planned maintenance, not an automatic reversal. Plan it, test it, schedule it.

  4. DNS TTL matters

    A failover that shifts DNS is limited by TTL. Keep critical records short (60-300s) or use anycast.

  5. Test the failover path

    A failover never exercised in production is a failover that will fail on the day it is needed.