Quick reference
Numbers card
One page of the book's taught numbers and formulas. Derived-only: each block names the topic that teaches it — the topic is the authority, this card is the reminder.
Latency orders of magnitude (→ 19)
(illustrative orders of magnitude; measure your own)
| Operation | Approximate cost |
|---|---|
| L1/L2 cache reference | ~1 ns |
| RAM access | ~100 ns |
| SSD read | ~100 µs |
| Disk (HDD) seek | ~10 ms |
| Same-datacenter network round trip | ~0.5 ms |
| Cross-continent network round trip | ~100+ ms |
Estimation formulas (→ 20)
| Input | Formula | Output |
|---|---|---|
| DAU × actions/user/day | ÷ 86,400 s/day | mean QPS |
| mean QPS × peak factor | — | peak QPS |
| total QPS × read/write ratio | — | read QPS, write QPS |
| arrival rate λ × avg time in system W | Little's Law, L = λW (→ 101) | concurrent users/requests |
| writes/day × avg payload size | × 365 | storage growth/year |
| reads/day × avg payload size | ÷ 86,400 s/day | mean bandwidth |
| where the users are | — | region split, CDN/replica placement (→ 94, 142) |
Little's Law and Amdahl's Law (→ 101)
- Little's Law: L = λ · W — concurrency = arrival rate × mean time in system.
- Amdahl's Law: S(n) = 1 / ((1−p) + p/n), p = parallelizable fraction; max speedup as n → ∞ is 1 / (1−p).
Availability nines (→ 192)
(exact: unavailability × 8,760 hours in a 365-day year)
| Availability | Unavailability | Downtime / year |
|---|---|---|
| 99% | 1% | 87.6 hours |
| 99.5% | 0.5% | 43.8 hours |
| 99.9% | 0.1% | 8.76 hours |
| 99.95% | 0.05% | 4.38 hours |
| 99.99% | 0.01% | 52.56 minutes |
| 99.999% | 0.001% | 5.256 minutes |