Chapter 17: Availability — Nines, SLAs, and Redundancy
Measuring Availability
Availability = Uptime / (Uptime + Downtime)
99.9% = 8.76 hours downtime/year (three nines)
99.99% = 52.6 minutes/year (four nines)
99.999% = 5.26 minutes/year (five nines — telecom grade)
Achieving High Availability
- Redundancy: no single point of failure (multiple servers, DBs, datacenters)
- Failover: automatic switch to backup when primary fails
- Health checks: detect failures quickly
- Graceful degradation: serve partial functionality rather than total failure
Availability in Series vs Parallel
// Series (both must work): A → B
// Availability = A × B = 99.9% × 99.9% = 99.8%
// Parallel (either works): A | B
// Availability = 1 - (1-A)(1-B) = 1 - 0.001×0.001 = 99.9999%
// Lesson: components in series REDUCE availability
// components in parallel INCREASE availability
SLA (Service Level Agreement)
A contract promising a certain availability level. Violation = credits/penalties.
| Service | Typical SLA |
|---|---|
| AWS S3 | 99.99% |
| AWS EC2 | 99.99% |
| Google Cloud SQL | 99.95% |
| Telecom voice (5 nines) | 99.999% |
Key Takeaways
- Each "nine" is 10x harder to achieve than the previous
- Eliminate single points of failure with redundancy
- Series components multiply (reduce) availability
- Parallel components increase availability dramatically
- Design for graceful degradation, not just uptime