Back-of-the-Envelope Estimation Without a Calculator
A repeatable method for estimating QPS, storage, bandwidth and server count, with the rounding tricks and reference numbers that make the arithmetic easy.
Back-of-the-envelope estimation is a quick, approximate calculation of the load a system must handle: requests per second, storage, bandwidth and number of servers. The purpose is not an exact figure. The purpose is to find the order of magnitude, because a system serving 100 requests per second and one serving 100,000 need different architectures.
What is evaluated is the reasoning: clear assumptions, simple arithmetic, and a conclusion that feeds into the design. These notes give a method that works for any question.
The method
- State the assumptions: daily active users, actions per user per day, size of each item.
- Compute requests per second (QPS), separately for reads and writes.
- Apply a peak factor.
- Compute storage per day, per year and for the planning horizon.
- Compute bandwidth if media is involved.
- Translate the numbers into a design decision.
The one trick: a day has about 100,000 seconds
A day has 24 × 60 × 60 = 86,400 seconds. Rounding this to 100,000 makes every division trivial, and the error of about 15 percent is irrelevant for an order-of-magnitude estimate.
The rule becomes: requests per day divided by 100,000 gives requests per second. One million requests per day is about 10 per second. One hundred million per day is about 1,000 per second. One billion per day is about 10,000 per second.
Worked example: QPS
Assume 10 million daily active users, and each user makes 10 requests per day. That is 100 million requests per day. Dividing by 100,000 gives about 1,000 requests per second on average.
Traffic is never uniform. There are busy hours and quiet hours, so the system must be sized for the peak. A common assumption is that peak traffic is two to three times the average. The design target is therefore about 3,000 requests per second. If the read-to-write ratio is 10 to 1, that is roughly 2,700 reads and 300 writes per second at peak.
Worked example: storage
Assume 1 million new posts per day and 1 KB of text per post. One million times 1 KB is 1 GB per day. Over a year that is about 365 GB, and over five years a little under 2 TB. A single database server with replicas can hold this.
Now add images. If each post has one image of 200 KB, storage is 200 times larger: 200 GB per day, about 73 TB per year, and roughly 365 TB in five years. This single change moves the design from one database to a distributed object store. It is also why images and videos are stored in object storage with only the URL kept in the database: mixing 200 KB blobs into database rows would make the database huge, slow to back up and expensive to replicate.
Replication multiplies storage as well. With three copies of everything, 365 TB becomes more than 1 PB of raw capacity.
ASSUMPTIONS DAU = 10 M Requests per user = 10 / day New posts = 1 M / day Text per post = 1 KB Image per post = 200 KB Read : write = 10 : 1 TRAFFIC Requests/day = 10 M x 10 = 100 M Average QPS = 100 M / 100,000 = ~1,000 Peak QPS = 3 x average = ~3,000 (reads ~2,700, writes ~300) STORAGE Text 1 M x 1 KB = 1 GB/day -> ~365 GB/year -> ~2 TB in 5 years Images 1 M x 200 KB = 200 GB/day -> ~73 TB/year -> ~365 TB in 5 years BANDWIDTH (image upload) 200 GB/day / 100,000 s = ~2 MB/s average ingress DECISION -> several stateless app servers behind a load balancer -> cache for the read path (2,700 reads/s) -> object storage + CDN for images; database holds metadata only
Reference numbers worth memorising
2^10 = ~1 thousand = 1 KB 1 character (ASCII) = 1 byte 2^20 = ~1 million = 1 MB Typical text record = ~1 KB 2^30 = ~1 billion = 1 GB Compressed photo = ~200 KB - 2 MB 2^40 = ~1 trillion = 1 TB 1 minute of HD video = ~50 - 100 MB 2^50 = 1 PB 1 day = ~100,000 seconds (86,400) 1 month = ~2.5 million seconds 1 year = ~30 million seconds 1 M requests/day = ~12 QPS 100 M requests/day = ~1,200 QPS 1 B requests/day = ~12,000 QPS
Read from memory ~100 ns Read from SSD ~100 microseconds Network round trip, same data centre ~0.5 ms Read from spinning disk (seek) ~10 ms Network round trip, cross-continent ~150 ms Takeaways: memory is far faster than disk; avoid cross-region calls in the request path; a cache hit is roughly 100x cheaper than a disk read.
Estimating servers and cache size
For application servers, assume a throughput per server and divide. If one server handles about 500 requests per second for this workload, a peak of 3,000 requests per second needs 6 servers, and you would provision a few more for redundancy and deployments.
For cache size, a common assumption is that 20 percent of the data serves 80 percent of the reads. If one day of posts is 1 GB of text, caching the hottest 20 percent takes about 200 MB, which fits on a single node. Estimates like this quickly show whether a component is a small box or a large cluster.
Always end with a design decision
Numbers that are calculated and then never used add nothing. Each estimate should lead to a sentence that begins 'so we need'. For example: 3,000 requests per second is beyond one server, so we need horizontal scaling behind a load balancer. Reads are ten times writes, so we need a cache and read replicas. Image storage is hundreds of terabytes, so we need object storage and a CDN. That link between numbers and architecture is the whole point of estimation.
Common mistakes
- Calculating with exact numbers such as 86,400 and getting lost in arithmetic. Round aggressively.
- Not stating assumptions, so the listener cannot follow or correct the reasoning.
- Forgetting peak traffic and sizing for the average.
- Mixing units, most often bits with bytes or KB with MB. Write the unit beside every number.
- Spending ten minutes on estimation. Three to five minutes is enough.
Interview summary
- A day is about 100,000 seconds.
- Requests per day divided by 100,000 gives QPS.
- Peak is two to three times the average.
- Storage = items per day × size per item × retention × replication.
- Order of work: assumptions, then calculation, then design decision.
Summary
Estimation is structured approximation. State the assumptions, divide daily volume by 100,000 to get requests per second, multiply by two or three for the peak, and multiply item counts by sizes for storage. Then turn each number into a design decision, because that is what the numbers are for.
Puneet Tiwari
Full Stack Developer
