Back-of-the-envelope estimation: sizing a system in two minutes
How to turn "10 million users" into requests per second, storage and number of servers with rough maths, and why interviewers care more about the method than the exact number.
In one sentence
Estimation turns users into requests per second, storage and bandwidth with rounded numbers. The goal isn't precision: it's knowing whether you need one database or a hundred.
Why estimate at all?
A design for 1,000 users and one for 100 million look nothing alike. Before drawing boxes, you need to know which order of magnitude you're dealing with: 10 requests per second fit on a laptop; 100,000 need caches, replicas and probably sharding.
In an interview, a two-minute estimate at the start shows that your later decisions ("we need a cache here", "this table must be sharded") come from numbers, not habit.
The method, step by step
- Daily active users (DAU). Take it from the prompt, or assume it and say so.
- Actions per user per day, split into reads and writes. A photo app: ~50 photos viewed, ~0.5 uploaded.
- Requests per second = DAU × actions / 86,400. Round 86,400 to 100,000:
10M × 50 / 10⁵ = 5,000 reads/s. - Peak = average × 2–3 (more for events like a ticket sale).
- Storage = writes per day × size × 365 × years. Don't forget replication (×3) if it matters.
- Bandwidth = requests per second × response size.
Numbers worth remembering
| Thing | Rough value |
|---|---|
| Seconds in a day | 86,400 ≈ 10⁵ |
| 1 million requests per day | ≈ 12 per second |
| Read from memory (Redis) | < 1 ms |
| Simple indexed query in SQL | a few ms |
| Round trip between continents | 100–200 ms |
| A single app server (simple API) | hundreds to a few thousand requests/s |
| A single well-tuned PostgreSQL | thousands of simple writes/s, more reads |
| 1 KB × 1 billion | 1 TB |
These are rules of thumb that depend on hardware and workload. Their job is to tell you when you're close to a limit, not to replace a load test.
Use the result to make decisions
| If the estimate says… | Then consider |
|---|---|
| Reads ≫ writes (100:1) | Caches, read replicas, a CDN |
| Thousands of writes per second | Queues, batching, write-optimized databases, sharding |
| Many TB per year | Object storage, partitioning, data retention rules |
| Huge peaks around events | Autoscaling, waiting rooms, rate limiting |
The URL shortener example: 1M daily users × 10 redirects ≈ 115 reads/s and ~1 write/s. One database with a cache is plenty. A photo app at 10M users stores terabytes per day: that's why images live in object storage, not in the database.
Key takeaways
- 01Estimate before designing: the order of magnitude decides the architecture.
- 02Requests per second = daily users × actions per day / ~100,000.
- 03Round aggressively and say your assumptions out loud.
- 04Turn each number into a decision: cache, replicas, queues, sharding or object storage.
Check your understanding
1 of 3
Requests per second ≈ daily users × actions per day ÷ …?
Related concepts
Read-heavy vs write-heavy
A read-heavy part is read far more than it changes (a video page); a write-heavy part receives a constant flood of new data (view counts, analytics). Each one needs different tools.
7 min read →Horizontal vs vertical scaling
Vertical scaling means a bigger server; horizontal scaling means more servers sharing the work. Vertical is simpler, horizontal goes further.
6 min read →Sharding
Sharding splits one big database into several independent databases (shards), each holding a slice of the rows, so storage and writes scale with the number of machines.
8 min read →