System Design Napkin Math
The latency numbers, constants, and powers of ten for back-of-the-envelope estimates.
Latency numbers every engineer should know
- L1 cache reference
- ~1 ns
- Main memory reference
- ~100 ns
- SSD random read
- ~16 µs
- Round trip within a datacenter
- ~0.5 ms
- Disk seek (HDD)
- ~10 ms
- Round trip CA ↔ Netherlands
- ~150 ms
Constants
- Seconds in a day
- ~86,400 (~10⁵)
- Seconds in a year
- ~31.5 million (~3×10⁷)
- Peak-to-average factor
- 2–10× (size for the spike)
- Read:write ratio (typical)
- often 100:1 — read-heavy
Powers of ten (bytes)
- KB / MB / GB
- 10³ / 10⁶ / 10⁹ bytes
- TB / PB
- 10¹² / 10¹⁵ bytes
- char ≈ 1 byte
- ASCII; UTF-8 up to 4
- token ≈ 4 chars
- rough LLM estimate
Availability (nines) → downtime/year
- 99% (two nines)
- ~3.65 days
- 99.9% (three)
- ~8.8 hours
- 99.99% (four)
- ~52 minutes
- 99.999% (five)
- ~5 minutes