System Design Numbers

Latency numbers, powers of two, availability nines, and the back-of-envelope math for turning DAU into QPS and storage.

estimationlatencycapacity

Latency every engineer should know

OperationTime
L1 cache reference~1 ns
Branch mispredict~3 ns
L2 cache reference~4 ns
Mutex lock/unlock~17 ns
Main memory reference~100 ns
Compress 1 KB~2 µs
SSD random read~16 µs
Read 1 MB sequentially from memory~100 µs
Round trip within same datacenter~500 µs
Read 1 MB from SSD~1 ms
Disk seek (HDD)~10 ms
Read 1 MB from disk~20 ms
Round trip across continents~150 ms

Takeaways: memory ≈ 100,000× faster than disk, a same-DC round trip is ~0.5 ms, and a cross-continent hop (~150 ms) dominates everything — so cache, and put data near users.

Powers of two (data sizes)

PowerName
2¹⁰1 thousandKB
2²⁰1 millionMB
2³⁰1 billionGB
2⁴⁰1 trillionTB
2⁵⁰1 quadrillionPB

Availability — the nines

AvailabilityDowntime / year
99% (two nines)~3.65 days
99.9% (three nines)~8.8 hours
99.99% (four nines)~52 minutes
99.999% (five nines)~5 minutes

Each extra nine is exponentially harder/costlier — redundancy, failover, multi-region. Match the target to the product, don't chase nines for free.

Capacity estimation recipe

  1. QPS: DAU × actions/user/day ÷ 86,400. A day ≈ 10⁵ seconds. Peak ≈ 2–3× average.
  2. Read:write: assume read-heavy (often 100:1) unless told otherwise → decide caching/replicas.
  3. Storage/year: writes/day × bytes/write × 365 (× replication factor).
  4. Bandwidth: QPS × payload size.

Worked example: 10M DAU, 10 reads + 1 write each → ~110M ops/day ÷ 10⁵ ≈ ~1.1k QPS average, ~3k peak. 1M writes/day × 1 KB ≈ ~365 GB/year before replication.

Use round numbers and say your assumptions

Nobody wants precision — they want to see that your numbers justify your design. "~3k peak QPS and 100:1 reads, so I'll add a cache and read replicas" is the whole point of estimating.