System Design Interview Chapter 2: Back-of-the-Envelope Estimation
Tony Duong
Aug 2, 2026 γ» 4 min
Notes from System Design Interview, Chapter 2. Interviewers care less about exact arithmetic and more about whether you can size a system with rough, defensible numbers.
Why estimate at all?
Back-of-the-envelope math answers:
- How many servers / shards do we need?
- Is the DB the bottleneck or the network?
- Does this design even fit in RAM / disk / budget?
Wrong by 2β3Γ is often fine. Wrong by 100Γ means the architecture is wrong.
flowchart LR
A[Product assumptions\nDAU, actions/day] --> B[QPS / peak QPS]
A --> C[Storage size]
B --> D[Servers / shards / bandwidth]
C --> D
D --> E{Fits constraints?}
E -->|yes| F[Proceed with design]
E -->|no| G[Change architecture]
Powers of two (memory / storage)
Know approximate sizes:
| Power | Approx value | Rough meaning |
|---|---|---|
| 10 | ~1 thousand | |
| 20 | ~1 million | |
| 30 | ~1 billion | |
| 40 | ~1 trillion |
Bytes:
1 KB β 10^3 bytes
1 MB β 10^6 bytes
1 GB β 10^9 bytes
1 TB β 10^12 bytes
1 PB β 10^15 bytes
Handy: 2^10 β 10^3, so binary prefixes track decimal ones closely enough for interviews.
Latency numbers that should be in your head
Order-of-magnitude intuition (classic Jeff Dean / systems table β memorize the shape, not every digit):
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 1KB with Zippy ~ 2 Β΅s
Send 2KB over 1 Gbps ~ 20 Β΅s
Read 1MB sequentially RAM ~250 Β΅s
Round trip same datacenter ~500 Β΅s
Disk seek ~ 10 ms
Read 1MB sequential disk ~ 20 ms
Send packet CA β Netherlands ~150 ms
Practical translation:
- Memory β« disk for random access
- Same-DC RPC is cheap compared to cross-region
- Avoid disk seeks in hot paths; prefer sequential / SSD / memory
Traffic estimates (QPS)
Typical interview flow:
- Ask for DAU / MAU (or assume with the interviewer)
- Estimate requests per user per day
- Convert to QPS, then peak QPS
QPS β (DAU Γ actions_per_user_per_day) / 86400
Peak QPS β QPS Γ peak_factor # often 2Γβ5Γ, confirm with interviewer
Example:
10M DAU
each user does 20 reads/day
β 200M reads/day
β ~2,300 QPS average
β ~5,000β10,000 QPS at peak (if 2β4Γ)
Always say assumptions out loud.
Storage estimates
storage β users Γ data_per_user Γ retention Γ replication_factor
Break objects into fields:
Tweet β 300 bytes metadata + media pointers
Photo β 200 KB average
5 years Γ 3 replicas β multiply carefully
Round aggressively. Show the formula, then the rounded result.
Bandwidth
bandwidth β QPS Γ average_payload_size
Useful when deciding CDN vs origin, or whether a single NIC is absurd for the load.
Tips that sound senior
- State assumptions before calculating
- Round to 1 significant digit early (
3.14 β 3,86400 β 10^5) - Sanity-check against known products (βInstagram-scale?β)
- Use estimates to drive design choices (shard count, cache size), not as decoration
- If the interviewer gives numbers, use theirs
Cheat sheet
| Question | Rough approach |
|---|---|
| QPS | DAU Γ actions/day / 86,400 Γ peak factor |
| Storage | records Γ size Γ retention Γ replicas |
| Cache size | working set (often βͺ total data) |
| Shards | write QPS or data size / per-node capacity |
Interview takeaway
Estimation is a communication tool. You are showing you can translate product scale into machine constraints β and catch designs that cannot possibly work.