Lesson 2.1 · 15 min
Availability and the nines
Compute what each nine allows, chain services together, and simulate a year of failures to see when redundancy works and when it does not.
The idea in plain words
Availability is how often your system is up when people need it. It is counted in “nines”: 99.9% sounds close to perfect but still allows almost nine hours of downtime a year.
The problem it solves
Things break: disks fail, deploys go wrong, networks drop. Users only care whether the service works when they need it, so you need a way to measure that and to design for a target.
How it works
- Measure availability as the share of time (or requests) that work, like 99.9%.
- Turn the target into allowed downtime: 99.9% leaves about 43 minutes a month.
- If a request needs several parts in a row, multiply their availabilities: each one can only lower the total.
- Add spare copies so one failure doesn’t stop the service, and make recovery fast.
Example
A request goes through a load balancer, an app server and a database, each 99.9% available. Together: 99.9% × 99.9% × 99.9% ≈ 99.7%, about 26 hours of downtime a year. Two independent app servers bring that part to 99.9999%, so the database becomes the part to fix next.
Key terms
- Availability
- The share of time (or of requests) the system works correctly.
- The nines
- 99.9% is “three nines”, 99.99% is “four nines”; each extra nine means 10× less downtime.
- SLA
- A promise to customers about availability, often with refunds if it is missed.
- Redundancy
- Spare copies of a part, so one failure doesn’t stop the service.
- Critical path
- The parts every request needs; their availabilities multiply together.
In this lesson you'll learn
- Turn any number of nines into real downtime per year, month and day.
- Combine components: multiply in series, and what redundancy really buys.
- Argue for (or against) another nine with MTBF, MTTR and the critical path.
Sections
- Theory: the nines
- Theory: chains and redundancy
- Design: in the interview
- Check yourself
Cheat sheet
| 99.9% | 8h 45m/yr · 43m/30 d |
|---|---|
| 99.99% | 52m 34s/yr · 4m 19s/30 d |
| Series | A₁ × A₂ × … |
| n replicas (independent) | 1 − (1 − A)ⁿ |
| A | MTBF ÷ (MTBF + MTTR) |
The interactive simulations and the quiz load with JavaScript.