Course map

Topic 192 / Core

High availability

Chapter 12.1 · High Availability and Failover

What and why

Availability was named a quality attribute at → 16 without the arithmetic behind it. High availability (HA) is the engineering discipline of hitting a stated availability target — conventionally written as a percentage of "nines" — by removing single points of failure and composing components so their combined uptime meets the target. Availability for a period is uptime ÷ (uptime + downtime) over that period; the rest of this topic is what happens to that number when components are chained in series or duplicated in parallel. Builds on: → 16 (non-functional requirements and quality attributes: scalability, availability, reliability, latency, measurable acceptance criteria).

Diagram

Downtime per year at each "nines" tier (exact: unavailability × 8,760 hours in a 365-day year):

Availability Unavailability Downtime / year
99% 1% 87.6 hours
99.5% 0.5% 43.8 hours
99.9% 0.1% 8.76 hours
99.95% 0.05% 4.38 hours
99.99% 0.01% 52.56 minutes
99.999% 0.001% 5.256 minutes

How it works

  1. Measure availability over a stated window — "available" has no meaning without a period attached (a day, a month, a year).
  2. Serial composition: if a request must pass through every component in a chain to succeed, the combined availability is the product of each component's availability — combined availability is always lower than the weakest single link.
  3. Redundancy (parallel composition): if only one of several independent components needs to be up for the request to succeed, combined unavailability is the product of each component's unavailability — far lower than any single component's, because all of them must fail together.
  4. Redundancy's gain depends entirely on independence — components sharing a power feed, a region, or a code path are not independent, and correlated failure defeats the math in step 3 (→ 193 covers isolating that shared risk).
  5. A target expressed as "N nines" is really a downtime budget per year (the diagram above); choosing a tier is choosing how much downtime the business can tolerate, not a badge of engineering quality for its own sake.

Practical example

(exact arithmetic, illustrative components). A request path has three serial components (load balancer, application, database), each independently rated at 99.9% availability: combined = 0.999³ = 0.997003 → 99.70%, i.e. (1 − 0.997003) × 8,760 ≈ 26.25 hours/year of downtime — roughly 3× worse than any one component's own 8.76 hours, purely from chaining three links. Now add one independent, identical backup for a single 99.9% component instead: combined unavailability = 0.001 × 0.001 = 0.000001 → availability 99.9999%, downtime 0.000001 × 8,760 h ≈ 31.5 seconds/year — a 1,000× reduction in downtime from one redundant pair, because unavailability multiplies rather than halves.

When to use it

  • Use HA engineering when: real downtime cost (revenue, safety, contractual penalty) justifies the cost of redundancy and the operational discipline to keep it independent.
  • Avoid over-building for it when: the realistic cost of an hour of downtime is low — a five-nines target for an internal reporting tool buys almost nothing for its cost.
  • Failure scenarios: redundant components that share a hidden single point of failure (same power circuit, same region, same connection pool) — the math in step 3 assumed independence that doesn't actually exist; a "nines" target set without ever computing what it costs in downtime minutes, so nobody can tell if it was met.
  • Simpler alternative: before adding redundancy, fix whatever single component has the worst availability in the chain — in a serial chain, raising the weakest link usually beats adding a parallel copy of an already-strong one.

Practice

(numeric — five drills with a verified answer key; 20 min, paper/calculator).

  1. Three serial components each at 99.9% availability. Combined availability and downtime/year?
  2. Two independent components each at 99% availability, deployed so only one needs to be up. Combined availability?
  3. A load balancer (99.99%), application tier (99.9%) and database (99.95%) in series. Combined availability and downtime/year?
  4. A single 99.9%-available component gets an identical, independent redundant backup (parallel). New combined availability, and the factor by which downtime/year drops?
  5. Four serial components each at 99.99%. Combined availability and downtime/year?

Answer key: (1) 0.999³ = 99.70%; downtime ≈ 26.25 h/year. (2) unavailability 0.01×0.01 = 0.0001 → 99.99%. (3) 0.9999×0.999×0.9995 ≈ 99.84%; downtime ≈ 14.0 h/year. (4) unavailability 0.001² = 0.000001 → 99.9999%; downtime ≈ 31.5 s/year; factor = 0.001 ÷ 0.000001 = 1,000×. (5) 0.9999⁴ ≈ 99.96%; downtime ≈ 3.50 h/year.

Done when all five answers match the key.

Key takeaway

Serial components multiply availabilities down; independent redundancy multiplies unavailabilities down far faster — but only if the components genuinely fail independently. Done when you can: compute combined availability and downtime/year for any serial or parallel arrangement, and state what hidden dependency would break the redundancy math. Used next in → 193 (fault tolerance and failure isolation, keeping redundant components independent), → 194 (redundancy and failover, the concrete mechanisms), → 203 (SLIs, SLOs and SLAs, where an availability target becomes a tracked commitment).

References

Site Reliability Engineering, 2nd edition — see references.md.

Source directory

Search the guide