Definition
What it is
Failover is a survival mechanism at the infrastructure layer. When a node, an availability zone or a region stops responding, the system routes traffic to a healthy replica, promotes the standby database, and shifts DNS or load-balancer targets. The transition is automatic and measured in seconds to minutes, not hours.
Failover is not the same as retry or a circuit breaker. Retry and breakers are about the request: what happens when one call fails. Failover is about the node: what happens when the whole primary is gone.
Why it matters
Cloud providers publish SLAs measured in nines. A "99.95%" SLA on a single AZ means 4.4 hours of downtime per year on average, and more during a full-AZ event. Multi-AZ deployments failover in seconds. Multi-region deployments failover in minutes. The difference between "the service is down" and "the service degraded" is failover.
Four DR strategies
Strategy | RTO | RPO | Cost | Description |
|---|---|---|---|---|
Backup & restore | Hours | Hours | Lowest | Backups in cold storage, restore on disaster |
Pilot light | 10s of min | Minutes | Low | Core services replicated, scaled to zero |
Warm standby | Minutes | Seconds | Medium | Scaled-down replica always running |
Multi-site active/active | Seconds | Near-zero | Highest | Both sites serve traffic, always |
Failover vs failback vs retry vs circuit breaker
Pattern | What it does | Trigger | Speed |
|---|---|---|---|
Failover | Switch to standby | Primary failure | Seconds to minutes |
Failback | Return to primary | Primary repaired | Controlled |
Retry | Re-attempt the call | Transient failure | Milliseconds |
Circuit breaker | Reject calls | Failure threshold | Immediate |
The failover flow
graph LR
P[Primary active] --> H{Health check}
H -->|OK| P
H -->|Fail| F[Failover triggered]
F --> S[Standby promoted]
S --> A[Active on standby]
A -->|Primary recovered| FB[Failback plan]
FB --> P
style P fill:#E8F5E9
style S fill:#FFF3E0
style F fill:#FFEBEE
How to implement failover well
Failover that does not turn into an incident
Automate detection and switch
Manual failover is minutes to hours; automated is seconds. Health checks must be smarter than "ping responded".
Prevent split-brain
Use quorum or a leader election (Raft, etcd, Consul). Two primaries with stale data is worse than one primary down.
Failback is a separate operation
Failback after failover is a planned maintenance, not an automatic reversal. Plan it, test it, schedule it.
DNS TTL matters
A failover that shifts DNS is limited by TTL. Keep critical records short (60-300s) or use anycast.
Test the failover path
A failover never exercised in production is a failover that will fail on the day it is needed.
Common failures
Origin
Failover is the ability of a workload to recover from infrastructure or service disruptions by automatically switching to a standby replica; failback is the controlled return to the primary once the disruption is resolved.
— Adapted from AWS Well-Architected Framework, Reliability Pillar, 2024
Evidence
FAQ
- Failover vs failback?
Failover is the switch to standby when the primary fails. Failback is the controlled return to the primary after it is repaired. Failback is a planned operation, not automatic.
- Which DR strategy to pick?
Backup & restore for cost-sensitive; warm standby for most SaaS; active/active when minutes of downtime cost more than the second region.
- What is split-brain?
Two primaries accepting writes independently. Their data diverges and reconciliation is expensive. Quorum prevents it.
- Does failover work with DNS?
Partially. DNS TTL limits how fast the failover propagates. Use anycast, short TTLs (60-300s), or an edge proxy.
- Should I failback automatically?
No. Failback is a planned operation with its own risks (data divergence, cache cold-start). Schedule it.
Connections
- circuit-breaker
- retry
- high-availability
- disaster-recovery
- rto
- rpo
● broader ● narrower ● related
Broader
operationshigh-availability
Related
- Circuit breaker
- Retry
disaster-recoveryrtorpohigh-availability
Used in the garden
No mentions yet.
Sources
AWS (2024). Reliability Pillar — Disaster Recovery strategies. https://docs.aws.amazon.com/wellarchitected/latest/reliability-pillar/reliability.html
Microsoft Learn (2025). Failover and failback. https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-tutorial-failover-failback
Google Cloud (2024). Regional deployment archetype. https://cloud.google.com/architecture/deployment-archetypes/regional
Etymology
Origin: compound
fail(verb): from Old French faillir, "to be lacking, to fail"over(adverb): Old English ofer, "across, above"
Semantic network
● broader ● narrower ● related
Broader
operationshigh-availability
Related
- Circuit breaker
- Retry
disaster-recoveryrtorpohigh-availability
Sources
AWS (2024). Reliability Pillar — Disaster Recovery strategies. https://docs.aws.amazon.com/wellarchitected/latest/reliability-pillar/reliability.html
Microsoft Learn (2025). Failover and failback. https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-tutorial-failover-failback
Google Cloud (2024). Regional deployment archetype. https://cloud.google.com/architecture/deployment-archetypes/regional