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
Where these numbers lie to you
- Sizing for average, not peak
- The single most common napkin-math mistake — always multiply by the peak-to-average factor above, or your "comfortable" capacity falls over on launch day.
- 10⁵ vs 10⁶ seconds/day
- A day is
~86,400 s ≈ 10⁵, not 10⁶ — an easy off-by-10× if you round in your head. - KB is ambiguous
- Storage vendors mean decimal
10³ = 1,000; OS/memory tools mean binary2¹⁰ = 1,024. The gap compounds — at TB scale it is a real, double-digit-percent difference. - Nines don’t add linearly
- Going from 99.9% to 99.99% is not "10% better" — it is 10× less downtime. Each extra nine is an order-of-magnitude harder engineering problem, not an incremental one.