LESSON 22.1
Measuring availability
What the nines mean in minutes, SLIs, SLOs and error budgets, and how dependencies multiply into your availability.
5 min read
"Highly available" means nothing until it has a number. Availability is the fraction of time, or of requests, in which the system works well enough for users.
The nines
- 99%~3.65 days a year
- ~7.2 hours a month
- 99.9%~8.8 hours a year
- ~43 minutes a month
- 99.95%
- ~22 minutes a month
- 99.99%~53 minutes a year
- ~4.3 minutes a month
- 99.999%~5 minutes a year
- ~26 seconds a month
Each extra nine costs far more than the last. At 99.99%, a single human-handled incident uses the whole month's allowance, so recovery has to be automatic.
SLIs, SLOs and SLAs
- SLI (indicator): what you measure. For example, the fraction of requests that return non-5xx within 300 ms.
- SLO (objective): the target for that SLI over a window. 99.9% over 30 days.
- SLA (agreement): a contract with customers, with penalties. Set it looser than the SLO so you have room before money is owed.
Measure close to the user (at the load balancer, or with synthetic probes), and measure what users notice: errors and latency on important journeys, not CPU.
Error budgets
An SLO of 99.9% means 0.1% of requests may fail. That 0.1% is the error budget. Spend it on deploys, experiments and planned maintenance. When it runs out, slow down and fix reliability. It turns "is this reliable enough?" from an argument into arithmetic.
Dependencies multiply
In series
- Simple to reason about
- Availability is the product: 0.999 × 0.999 × 0.999 ≈ 0.997
Pick it when: A request needs every component: gateway, service, database.
In parallel (redundant)
- Unavailability multiplies: two 99% replicas give 1 − 0.01² = 99.99%
- Only if failures are independent
- Failover must actually work
Pick it when: Replicas behind a load balancer, database standby.
So each critical-path dependency must be more available than your target, or redundant, or removed from the critical path (made asynchronous, cached or optional).
Try it
Multi-region Failover HLD
Design a service that survives the loss of a whole region.