Course map

Topic 194 / Core

Redundancy and failover: active–passive, active–active

Chapter 12.1 · High Availability and Failover

What and why

Isolating a failure (→ 193) contains the damage; failover is what actually keeps serving traffic once the isolated unit goes down — a redundant unit takes over. Active–passive keeps a standby idle until a detected failure promotes it — simpler, but the promotion itself costs recovery time. Active–active keeps every redundant unit serving traffic all the time — no promotion delay, but now every unit must handle conflicting or concurrent state. Builds on: → 193 (fault tolerance and failure isolation).

Diagram

Active–passive Active–active
Normal operation one unit serves, one (or more) stands by idle all units serve simultaneously
On failure standby is promoted — takes a detection + promotion delay traffic already elsewhere; no promotion step
Main cost recovery time during promotion conflict handling (→ 129, → 134) across units both accepting writes
Needs reliable failure detection (→ 127) a way to reconcile concurrent updates
Risk promoting a standby that isn't actually caught up both units believing they're primary at once — split-brain (→ 133)

How it works

  1. Active–passive: the standby replicates state from the active unit continuously; on a detected failure, a promotion step makes the standby the new active — that step is the downtime window, bounded by detection time plus promotion time.
  2. Active–active: every unit already accepts traffic; a failing unit's share is simply redistributed by the load balancer or router (→ 92, → 94) to the survivors — no promotion step, because nothing needed to change roles.
  3. Both need reliable failure detection (→ 127) — a false positive triggers an unnecessary, disruptive failover; a false negative leaves traffic going to a dead unit.
  4. Automatic failover must guard against split-brain: if the "failed" unit wasn't actually down (just slow, or partitioned from the detector), promoting a new active while the old one still thinks it's active leaves two units both accepting writes — avoided by a single source of truth for who is active, typically a leader-election mechanism (→ 133).
  5. Both failover modes must themselves be tested — an untested failover path is exactly as likely to fail, under real pressure, as any other untested code path (→ 200).

Practical example

(illustrative). Active–passive: failure detection takes 10 s, standby promotion takes 20 s, DNS/client re-point takes 5 s — total failover window ≈ 10 + 20 + 5 = 35 seconds of unavailability for whatever depended on the failed unit. Active–active with the same failure: the load balancer's health check removes the failed unit from rotation in roughly one health-check interval (say 5 s), and the surviving units absorb the redistributed traffic immediately — no promotion step, so the unavailability window is closer to 5 seconds, not 35.

When to use it

  • Use active–passive when: the system can tolerate a bounded failover window and the simplicity of a single active unit (no conflict handling) is worth more than that window.
  • Use active–active when: near-zero failover time matters enough to justify building and testing conflict resolution across simultaneously-active units.
  • Avoid automatic failover without tested detection: a failover mechanism that has never been exercised is unverified, not available.
  • Failure scenarios: split-brain from a network partition that looks like a failure to the detector but isn't one to the old active (→ 133 resolves this with a single authoritative leader); promoting a standby that was still catching up on replication, serving stale or missing data the instant it takes over; active–active units silently diverging because no conflict-resolution rule was actually implemented.
  • Simpler alternative: for a system that tolerates minutes of downtime, no automatic failover at all — a documented manual failover runbook, run by a human, avoids split-brain entirely at the cost of a longer, human-paced recovery.

Practice

(decision kind — judge scenarios and defend the choice; 15–20 min, paper). For a payment ledger (writes must never silently duplicate) and a read-heavy content feed (stale reads are tolerable), decide active–passive or active–active for each, and name the one risk (split-brain, or conflict handling) your choice must explicitly guard against. Done when each choice names the specific mechanism (→ 133 or a stated conflict-resolution rule) that prevents its named risk.

Key takeaway

Active–passive trades a bounded failover window for simplicity; active–active trades conflict-handling complexity for near-zero failover time — and both depend on failure detection that's been tested, not assumed. Done when you can: compute a failover window from its component delays, and name what prevents split-brain in an automatic failover design. Used next in → 195 (disaster recovery, failover generalized to regional scale), → 196 (multi-region traffic and failover, the orchestration layer), → 133 (leader election, preventing split-brain), → 127 (failure detection, the trigger both modes depend on).

References

None — this topic makes no external claims.

Source directory

Search the guide