System design concepts · Staying Up and Staying Safe

High Availability and Reliability: Nines, SLOs and Redundancy

Availability is arithmetic plus discipline: remove single points of failure, know how components combine, spend your error budget on purpose, and rehearse the bad day before it happens.

What you'll be able to explain
  • Calculate the availability of serial and parallel components
  • Remove single points of failure across failure domains
  • Choose redundancy patterns: active-active, active-passive, N+1
  • Run reliability with SLOs, error budgets and burn-rate alerts
  • Handle incidents, write blameless post-mortems and practise chaos engineering

Availability, reliability, durability

Three words that are often mixed up:

Term Question it answers Example target
Availability Can I use it right now? 99.95% of requests succeed
Reliability Does it do the right thing, consistently, over time? Orders are never lost or duplicated
Durability Once saved, will my data still be there? 99.999999999% of objects survive a year

A system can be available but unreliable (it responds quickly with wrong data) or durable but unavailable (your photos are safe, but the app is down).

The nines

Availability Downtime per year Per month Per week
99% 3.65 days 7.3 hours 1.7 hours
99.9% 8.8 hours 43.8 minutes 10.1 minutes
99.95% 4.4 hours 21.9 minutes 5 minutes
99.99% 52.6 minutes 4.4 minutes 1 minute
99.999% 5.3 minutes 26 seconds 6 seconds

Each extra nine costs roughly an order of magnitude more effort. At 99.99%, a human can't even be paged and log in before the monthly budget is gone, so detection and recovery must be automatic.

Availability arithmetic

In series (A calls B; both needed): multiply. Two 99.9% components → 99.8%. In parallel (redundant copies; any one works): 1 − (1 − a)ⁿ. Two 99% replicas → 99.99%.

LB 99.99% → App 99.9% → DB 99.95%in series ≈ 99.84%App × 3 replicas at 99.9% eachin parallel ≈ 99.9999999% (if failures are independent)Two regions at 99.9% each≈ 99.9999% if failover is automatic and tested
Dependencies in series lower availability; redundancy in parallel raises it.

Two lessons:

  1. Every synchronous dependency lowers your ceiling. A page that calls 10 services, each 99.9% available, is at best ~99%. Remove critical-path dependencies, make the remaining ones redundant, and make non-critical ones optional (Designing for Failure).
  2. Parallel maths assumes independent failures. Three replicas on the same rack, using the same config, deployed at the same moment, are not independent. Correlated failures (a bad deploy, a shared dependency, the same bug) are what actually take systems down.

Failure domains

Domain Typical failure Defence
Process / instance Crash, OOM, bad deploy Multiple instances behind an LB, health checks
Rack / host Power, top-of-rack switch Spread instances (anti-affinity)
Availability zone Power or cooling for a data centre Run across 2–3 AZs; synchronous DB standby in another AZ
Region Major outage, natural disaster, bad global config Multi-region with a DR strategy (Multi-Region Architecture and Disaster Recovery (RPO, RTO))
Dependency Cloud service, DNS provider, payment gateway Fallbacks, multiple providers
Human Bad config push, deleted table Staged rollouts, backups, least privilege