Back-of-the-envelope estimation
Quick arithmetic that tells you whether you need one server or a thousand, and which resource will run out first.
On the roadmap:Beginner · step 1: Think like a designer
Lesson 3 of 13 · 9 min read · quiz · exercise
Why estimate at all
You do not need exact numbers. You need to know the order of magnitude: is it 100 requests per second or 100,000? Is the data 10 GB or 10 PB? Those answers change the architecture completely, and you can get them with simple arithmetic.
Numbers to remember
Powers of two for sizes:
| Unit | Approx. size |
|---|---|
| 1 KB | a thousand bytes |
| 1 MB | a million bytes |
| 1 GB | a billion bytes |
| 1 TB | a trillion bytes |
| 1 PB | a thousand TB |
Time: one day is about 86,400 seconds, which we round to 100,000 (10^5) to make mental maths easy.
Rough latencies (the exact values change with hardware, the ratios matter):
| Operation | About |
|---|---|
| Read from memory | 100 ns |
| Read 1 MB sequentially from memory | tens of microseconds |
| SSD random read | 100 microseconds |
| Round trip inside one data center | 0.5 ms |
| Disk seek | 10 ms |
| Round trip across continents | 100 to 150 ms |
Two lessons fall out of this table: memory beats disk by orders of magnitude, and crossing a network or an ocean is expensive, so avoid unnecessary round trips.
A method
- Start from users: daily active users (DAU).
- Actions per user per day, giving total requests per day.
- Divide by 100,000 for average requests per second (QPS).
- Multiply by 2 to 5 for peak QPS.
- Size per item times items per day gives storage per day; multiply by retention and replication.
The method as a picture
Figure SDA-FND-03-1 · From users to requests and storage · © forcsguy.com
Worked example: a short-link service
- 100 million new links per month.
- Reads outnumber writes 10 to 1.
Writes per second: 100,000,000 / (30 x 86,400) is about 40 per second. Reads: about 400 per second. Peak maybe 2,000 reads per second.
Storage: each record is about 500 bytes (the short key, the long URL, a date). 100 million per month x 12 months x 5 years = 6 billion records x 500 bytes = 3 TB. Easily one modern database over a few years, with replicas for safety.
What did we learn? The write rate is tiny, reads are modest, and the whole data set is small. This is not a problem that needs exotic technology, so the design should be simple. That conclusion is the point of estimating.
Figure SDA-FND-03-2 · Turning users into load and storage · © forcsguy.com
Rules of thumb
- Round aggressively. 86,400 becomes 100,000. 2.7 becomes 3.
- Write units next to every number. Most mistakes are unit mistakes (bits versus bytes, MB versus GB).
- State your assumptions. If someone disagrees with 10 requests per user, you can change one number and recompute.
- Sanity check against reality. If your estimate says a small app needs a million servers, an assumption is off.
Real-world reading
Related reading
- Cockroach Labs BlogCockroach Labs engineers · Cockroach LabsBlogs
- The Architecture Twitter Uses to Deal with 150M Active Users, 300K QPS, a 22 MB/S Firehose, and Send Tweets in Under 5 SecondsHigh Scalability engineers · High ScalabilityCase Studies
- AWS Database BlogAWS database teams · Amazon Web ServicesBlogs
- LISA '10 - Operations at Twitter: Scaling Beyond 100 Million UsersYouTubeYouTube
Show 6 moreShow fewer
- Instagram Architecture: 14 Million users, Terabytes of Photos, 100s of Instances, Dozens of Technologies - High Scalability -High Scalability engineers · High ScalabilityCase Studies
- Playfish's Social Gaming Architecture - 50 Million Monthly Users and Growing - High Scalability -High Scalability engineers · High ScalabilityCase Studies
- CockroachDBCockroach Labs · GitHubGitHub
- AWS Compute BlogAmazon Web Services engineers · Amazon Web ServicesBlogs
- Yelp Engineering BlogYelp engineers · YelpBlogs
- Telstra BlogTelstra engineers · TelstraBlogs
Check your understanding
Question 1 of 3
0 correct so far
A service has 10 million daily active users and each makes 10 requests a day. About how many requests per second is that on average?
Go deeper
- Latency numbers every programmer should know by Jeff Dean (popularised): search for the table; exact figures change, the orders of magnitude do not
- Latency numbers every programmer should know (interactive) by Colin Scott: how the figures change by year
- Compute service level agreements by Amazon Web Services: real availability promises to compare with your own targets
- Compute Engine service level agreement by Google Cloud: another provider's published availability figures
Practise it: Size for the peak, not the average
Everything below is already set up for this lesson: change the design, run the traffic, and see whether you meet the goal.
- 1The task
- 2Build and test
Average traffic is 1,000 requests per second, but a daily spike takes it to about 4,000. Capacity planned for the average falls over at peak.
Goal: Survive the spike with under 1% errors, within $1,300 a month.
More servers work but cost money. Is there a way to answer repeated reads before they reach your servers?
Try it yourself
A photo app has 5 million daily active users. On average each user uploads 1 photo a day, and a photo is about 2 MB. Estimate the storage needed for one year of photos, and the average upload requests per second. Show your arithmetic.
Click what a strong design here would need:
Next course
© 2026 forcsguy.com. Original lesson text and diagrams. Books and sites linked above belong to their authors.