Back-of-the-Envelope Estimation
Estimate QPS, storage, bandwidth and server counts from user numbers, so your design is sized to reality instead of guesses.
Beginner · about 3 hours · difficulty 2/5
Learn first: Latency Numbers and Performance Metrics
Before drawing boxes, size the problem. Estimation tells you whether one Postgres box is enough or whether you need sharding, and it shows interviewers you think in numbers.
Handy conversions
- 1 day is about 86,400 seconds; round it to 100,000 (10^5) for quick maths.
- 1 million requests per day is roughly 12 QPS. 1 crore (10 million) per day is about 120 QPS.
- Peak traffic is often 2x to 10x the average (IPL finals, Big Billion Days, Tatkal at 10 AM).
- 1 KB x 1 million = 1 GB; 1 MB x 1 million = 1 TB.
A standard flow
- Users: daily active users (DAU) and actions per user per day.
- QPS: DAU x actions / 10^5, then multiply for peak. Split read vs write QPS.
- Storage: writes per day x size per record x retention (years x 365). Add replication (usually 3x).
- Bandwidth: QPS x response size.
- Memory for cache: often the 80/20 rule, caching around 20 percent of daily read data.
- Servers: peak QPS / QPS one server handles (a few thousand simple requests per second is a fair rough guess).
Worked example: a URL shortener
100 million new URLs per month is about 40 writes per second. With a 100:1 read ratio, that is about 4,000 reads per second. At 500 bytes per record over 5 years: 100M x 12 x 5 x 500 B, about 3 TB. That fits in a sharded or even a large single database with replicas, and a Redis cache of hot links handles the reads.
Pitfalls
- Spending ten minutes on exact arithmetic. Round aggressively and state assumptions out loud.
- Forgetting peak traffic and replication overhead.
- Estimating and then never using the numbers to make a decision.
You are ready to move on when you can size QPS, storage and cache memory for a photo sharing app in under five minutes on paper.
Key concepts
- DAU to QPS conversion
- Peak vs average traffic
- Storage estimation
- Bandwidth estimation
- Cache sizing (80/20 rule)
- Server count estimation
- Powers of two and ten
Mini project
Write estimation sheets for three systems (Instagram-style photo feed, WhatsApp-style chat, Zomato-style restaurant search) covering QPS, peak QPS, 5-year storage, bandwidth and cache memory, with every assumption written down.
Check yourself
A chat app has 50 million DAU sending 40 messages each per day, 200 bytes per message. Estimate average write QPS and one year of storage before replication.
Free resources
- System Design Primer: back-of-the-envelope appendix (GitHub)
- ByteByteGo System Design 101 (ByteByteGo)
- ByteByteGo YouTube channel (YouTube)