Skip to content

Failover

Failover is the automatic switch of traffic to a standby replica when the primary fails, keeping the service available without human intervention.

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

  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.

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
1990s · failover en clustering (VMS, Sun Cluster)
2006 · AWS S3 introduce multi-AZ
2014 · AWS publica el paper de cuatro estrategias DR
2010s · multi-region failover se vuelve estándar
2024 · RTO/RPO son métricas operativas estándar

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

Failoveroperationshigh-availCircuit brRetrydisaster-rrtorpohigh-avail

● broader ● narrower ● related

Broader

  • operations
  • high-availability

Related

Used in the garden

No mentions yet.

Sources

Etymology

Origin: compound

  • fail (verb): from Old French faillir, "to be lacking, to fail"
  • over (adverb): Old English ofer, "across, above"

Semantic network

Failoveroperationshigh-availCircuit brRetrydisaster-rrtorpohigh-avail

● broader ● narrower ● related

Broader

  • operations
  • high-availability

Related

Sources