29. Failures, Retries, Circuit Breakers
29.3 How does the "nines" math work?
At home: "The power was out about 9 hours this year" sounds bad. "99.9% uptime" sounds great. They're the same thing.
In the system: Availability is the fraction of time (or of requests) a service works. Each extra nine cuts allowed downtime by 10×:
Figure: every extra nine costs much more; chains lose nines, parallel copies gain them.
| Availability | Down per 30-day month | Down per year |
|---|---|---|
| 99% | 7.2 hours | 3.65 days |
| 99.9% | 43 minutes | 8.8 hours |
| 99.99% | 4.3 minutes | 53 minutes |
| 99.999% | 26 seconds | 5.3 minutes |
Two rules:
- In series (all parts needed), availabilities multiply: checkout needs payment (99.9%), inventory (99.9%) and itself (99.95%): about 99.75%, lower than any single part.
- In parallel (any one is enough), failure probabilities multiply: two independent copies at 99% each give 1 − 0.01 × 0.01 = 99.99%.
So: keep the critical path short, make non-essential calls optional (a down recommendations service shouldn't count against checkout), and add redundancy where it buys real nines. Chapter 30 turns these numbers into targets (SLOs) and error budgets.
Memory code: "Each nine is ten times less downtime; chains lose nines, copies gain them."