Back-of-the-Envelope Estimation
Translate product scale into QPS, bandwidth, storage, and memory numbers in two minutes.
Turn daily active users into requests per second and realistic spike numbers.
BeginnerCalculate 5-year disk growth, network throughput, and how much RAM your cache needs.
BeginnerCompare CPU, RAM, Redis, SSD, and cross-continent network speeds at a glance.
BeginnerIn plain words
Before building anything, do quick rough math to learn how big the system needs to be: how many users, requests, and how much storage. You only need the right ballpark, not exact numbers.
Think of it like…
Checking your luggage weight at home before going to the airport - rough numbers tell you immediately whether one bag works or you need two.
Where you’ve seen it
A photo app with 10M daily users, each uploading 2 photos of 2 MB, stores about 40 TB of new data every day. That one number tells you a single server’s disk is nowhere near enough.
Words you’ll hear
- QPS
- Queries per second: how many requests hit the system each second.
- DAU
- Daily active users: how many people use the product on a typical day.
- Peak traffic
- The busiest moment, often 2–3× the average. Design for this, not the average.
- Read:write ratio
- How many times data is read for each time it is written.
Visual diagram
Theory & deep dive
Why rough math beats guessing
In system design, you rarely need exact numbers, because real traffic changes every hour. What you DO need is the right order of magnitude: will this fit on one $50 database server, or does it need 50 shards and a CDN?
Back-of-the-envelope estimation bridges product requirements ("100 million users") and hardware reality ("a single SSD holds ~4 TB and a single PostgreSQL primary handles ~5,000–15,000 writes/sec").
Suppose 100M new URLs are created per month. 100M / (30 × 10⁵) ≈ 33 writes/sec. With a 100:1 read/write ratio, reads are ~3,300 QPS. Each URL row is ~500 bytes, so 5 years (60 months) is 6B rows × 500 B = 3 TB - easily fits in one sharded SQL cluster or small NoSQL table.
Latency numbers every engineer should recognize
Memory is roughly 1,000× faster than an SSD, and a local SSD is roughly 100× faster than sending a packet across an ocean. Knowing this ladder explains why caches, CDNs, and batching exist.
When a user in Mumbai hits a server in Virginia, the speed of light alone adds ~150 ms per round trip - no amount of faster CPU on the server can fix physics. Moving static files to a nearby CDN edge cuts that wait to ~15 ms.
Designing for peak, not average
Average QPS hides traffic spikes. Food delivery apps spike at lunch and dinner; ticketing apps spike 20× the second concert seats go on sale. Multiplying average QPS by 2×–5× gives you a realistic peak target.
Also remember the difference between Bytes (storage, file sizes) and bits (network speed). A 10 MB/s stream uses 80 Mbps of network bandwidth.
How it works, step by step
Step 1 of 41. Clarify DAU and actions per user
Start from Daily Active Users (DAU) and average actions per user per day. For example, 100M DAU making 10 reads and 1 write per day.
- DAU
- 100M
- Reads/day
- 1B
- Writes/day
- 100M
When to use it & trade-offs
What it is
Back-of-the-envelope estimation uses rough powers of 2 and 10 to size compute, cache, storage, and network capacity before drawing architecture boxes.
Why it matters: Interviewers use estimation to verify whether a single database or cache fits the workload or if you actually need sharding, CDNs, or async queues.
When to reach for it
- Early in an HLD interview (3–5 minutes max) to justify architectural choices
- Deciding whether hot working sets fit in a single Redis cluster or need tiering
- Identifying read-heavy vs. write-heavy ratios (e.g., 100:1 vs. 1:1)
When to avoid or be careful
- Spending 15 minutes doing long arithmetic with 4 decimal places
- Computing numbers and never referencing them in your design decisions
- Forgetting peak-to-average multipliers (traffic spikes at events or commuting hours)
Key Reference Numbers to Memorize
Strengths: 1 day ≈ 10⁵ sec; 1M req/day ≈ 12 QPS; 1B req/day ≈ 12k QPS.
Watch out: Rounds 86,400 to 100,000 (~15% margin), which is fine for sizing.
Strengths: 10³ = KB, 10⁶ = MB, 10⁹ = GB, 10¹² = TB, 10¹⁵ = PB.
Watch out: Remember to factor in replication (3×) and index overhead (~1.3×).
Strengths: RAM ~100 ns, Redis ~0.5 ms, SSD read ~0.1–1 ms, same-region RPC ~0.5 ms, cross-continent ~100–150 ms.
Watch out: Tail latency (P99) under load is often 5–10× median latency.
Interview signals & numbers to know
When this topic comes up
- DAU / MAU
- reads per second
- storage for 5 years
- how much bandwidth
- cache size
Benchmarks & rules of thumb
- Seconds per day
- 86,400 (~10⁵)
- L1 / RAM access
- ~1 ns / ~100 ns
- Redis / in-memory network hop
- ~0.5 ms
- Cross-continent round trip
- ~100–150 ms
Common mistakes & follow-ups
Common interview mistakes
- Using exact 86,400 and getting stuck on mental division instead of rounding to 10⁵
- Forgetting replication factor (typically 3×) and backups when sizing disk
- Confusing bits (Mbps/Gbps) with bytes (MB/s, GB/s) - remember 1 Byte = 8 bits
Likely interviewer follow-ups
- What happens if a celebrity triggers a 20× spike on one partition?
- Which parts of this system are compute-bound vs. I/O-bound?
- At what QPS would you move from one primary database to read replicas or shards?
Knowledge check
Put it into practice
Design full architectures with AI feedback
Apply Back-of-the-Envelope Estimation inside real High-Level Design prompts or review Q&A flashcards.