System design interviews · estimation
Only the numbers and formulas that actually earn points in a system design interview. The handful of values worth memorizing, the five formulas you run on every question, the capacity anchors you quote out loud, and three classic problems worked end to end. Skim it the night before; reach for it mid-whiteboard.
86,400 → ~100,000. Nobody wants long division on a whiteboard.Run this same five-step sequence on every capacity question. Doing it in order, out loud, is most of the score.
Ask for or assume DAU, actions per user per day, read:write ratio, average payload size, and retention. Write them in the corner of the board so you can reference them.
QPS = daily_actions ÷ 86,400 (≈ ÷100k). Then peak = avg × 2–10×. Split read QPS and write QPS, they drive different parts of the design.
writes/day × size_each × days × replication. Use a 5-year horizon and ×3 replication. State the headline: “~X TB/year.”
Bandwidth = QPS × payload (read and write separately). Cache memory = hot_items × size, with the hot set ≈ the 20% serving 80% of traffic.
Turn numbers into machines and a bottleneck: number of cache nodes, shards, replicas; then name the one constraint that shapes the design (read-heavy → cache; write-heavy → shard; huge fan-out → hybrid).
Memorize these. Every estimation question is some combination of them.
QPS
avg QPS = daily_requests ÷ 86,400
peak QPS = avg QPS × peak_factor
86,400 s/day ≈ 100k, so 1M/day ≈ 12 QPS. Peak factor: 2× steady B2B, 5–10× consumer.
Storage
storage = writes/day × size_each
× retention_days × replication
Replication usually ×3. Add ~1.2–2× for indexes/metadata. Use a 5-year horizon.
Bandwidth
bandwidth = QPS × payload_bytes
Read and write separately. ×8 for bits/s. Egress is what shows on the cloud bill.
Cache memory
cache RAM = hot_items × size_each
hot_items ≈ 20% of total (80/20)
If the hot set fits in RAM across a few nodes, the DB barely sees read traffic.
Number of machines
machines = peak_QPS ÷ per_machine_QPS
or total_data ÷ per_machine_capacity
Size on peak; run at ~70%. Use the anchors in section 4 for per_machine_QPS.
QPS conversion table
| 1M / day | ≈ 12 QPS |
| 10M / day | ≈ 115 QPS |
| 100M / day | ≈ 1.2k QPS |
| 1B / day | ≈ 11.6k QPS |
The constants that turn vague requirements into bytes and seconds. Learn these once and the arithmetic is fast.
Powers of two → data sizes
| Power | Approx number | Size |
|---|---|---|
| 2¹⁰ | 1 thousand | 1 KB |
| 2²⁰ | 1 million | 1 MB |
| 2³⁰ | 1 billion | 1 GB |
| 2⁴⁰ | 1 trillion | 1 TB |
| 2⁵⁰ | 1 quadrillion | 1 PB |
Availability → downtime / year
| Nines | Downtime / yr | / day |
|---|---|---|
| 99% | 3.65 days | 14 min |
| 99.9% | 8.8 hours | 86 s |
| 99.99% | 52.6 min | 8.6 s |
| 99.999% | 5.3 min | 0.86 s |
Size of one thing
| Item | Size |
|---|---|
| ASCII char | 1 B |
| int / float | 4 B |
| long / double / timestamp | 8 B |
| UUID | 16 B |
| Tweet / short post | ~300 B–1 KB |
| Web page (HTML) | ~100 KB |
| Photo (compressed) | ~1–5 MB |
| Minute of 1080p video | ~50 MB |
Time & traffic constants
| Quantity | Value |
|---|---|
| Seconds / day | 86,400 ≈ 10⁵ |
| Seconds / month | ~2.6M |
| Peak factor (consumer) | ×2–10 |
| Replication factor | ×3 |
| Cache hit set (80/20) | ~20% → 80% |
| Read:write (social) | ~100:1 |
When you need to say “so we’d need N machines,” these are the safe round numbers to quote. They are deliberately conservative, exactly what an interviewer expects to hear.
| Resource | Quote this | Use it to size… |
|---|---|---|
| App server throughput | ~1,000 QPS | number of app/web servers |
| SQL database (per node) | ~few k QPS | when to add read replicas / shard |
| Cache (Redis/Memcached) | ~100k+ ops/s | cache tier size; absorbs read load |
| Message queue (per node) | ~10k–100k msg/s | ingestion pipelines |
| RAM per machine | ~64–256 GB | how many nodes to hold data in memory |
| SSD per machine | ~few TB | how many nodes to store data on disk |
| Object store (S3-like) | effectively ∞ | blobs, media, backups, logs |
Cache when reads >> writes (the 80/20 rule means a small cache absorbs most reads). Replicate when you need read scale or availability (replicas serve reads; one primary takes writes). Shard when the data or the write load outgrows a single node. Most designs use all three.
The interviewer’s favourite follow-up is “now it grows 10×, what breaks?” Each card leads with the numbers: 1 node what a single node handles, scale when the threshold that forces a move, breaks what goes wrong, next the move and how much more it buys. Compare your estimate against the “1 node” figure to decide one box vs many.
Almost every “what breaks” answer is one of three: writes exceed one node → shard; reads exceed one node → replicate or cache; data exceeds one node’s RAM/disk → shard or tier. The tool changes; the moves do not. Say the move and the trade-off it costs, and you have answered the question.
The classics, run through the exact five-step flow. Notice the rounding: one significant figure the whole way.
100M new URLs/day · 100:1 read:write
Shape: trivial write path, cache-first read path. Not a hard problem at scale.
200M DAU · 2 posts/user/day · ~200 followers avg
Shape: cost is fan-out, not raw posts. The celebrity tail forces the hybrid model.
500M DAU · 40 messages/user/day · ~100 B each
Shape: high op-rate, small payloads, persistent connections. Shard and queue.
500 h uploaded/min · ~5B views/day
Shape: bytes, not QPS. Object store + CDN + async transcode.
500M DAU · 100M photos/day · ~100:1 read:write
Shape: Twitter feed + heavy media storage. CDN for images.
~10M active drivers · location ping every 4 s · 1M rides/day
Shape: firehose of ephemeral writes → in-memory + geo-sharding, not a DB.
500M users · ~10 GB stored each · sync across devices
Shape: storage + dedup + metadata. Blocks in object store, map in DB.
crawl ~1B pages/day · ~100 KB/page · re-crawl for freshness
Shape: throughput + a huge dedup set → queue, workers, bloom filter.
~1M API req/s · per-user limit · must add < 1 ms
Shape: 1M ops/s > one Redis node → shard; counters are memory-cheap.
You rarely calculate with these, but they justify your design choices: why cache (memory vs disk), why a CDN (cross-region), why colocate (same-DC vs cross-ocean). Know the orders of magnitude.
| Operation | Latency | Relative | Why it matters in design |
|---|---|---|---|
| Read from memory (RAM) | ~100 ns | why caches exist | |
| Read 1 MB from RAM | ~5 µs | in-memory is “free” | |
| SSD random read | ~100 µs | ~1000× slower than RAM → cache hot data | |
| Round trip, same datacenter | ~500 µs | keep chatty services colocated | |
| Read 1 MB from SSD | ~1 ms | disk is fine for cold/bulk | |
| HDD seek | ~10 ms | avoid random disk on the hot path | |
| Round trip, cross-continent | ~150 ms | why CDNs & regional replicas exist |
The one-liner to remember: memory ~100× faster than SSD; SSD ~100× faster than crossing an ocean. Every network hop you remove is worth more than a thousand code optimizations.
Sources & further reading: ByteByteGo: Back-of-the-envelope · systemdesign.one · Latency Numbers Every Programmer Should Know (jboner) · System Design Primer. Figures are deliberately rounded; in an interview the reasoning matters more than the exact digits.