Lesson 2 / 30
A Repeatable Estimation Process
Apply a five-step process: clarify scope, write assumptions, compute, sanity-check and identify the bottleneck.
By Rahul Agarwal · 15 years in web development
Five steps, written down
Good estimates are boring and explicit. Step 1, clarify scope: which features count (posting, reading, search?) and which metrics matter (QPS, storage, cost). Step 2, write assumptions as a short list: daily active users, actions per user per day, object sizes, retention period, peak factor. Step 3, compute with round numbers, carrying units on every line so mistakes are visible. Step 4, sanity-check each result against something you know: does 50 TB per day for a college app feel plausible? Is one server really handling a million QPS? Step 5, name the bottleneck: which resource (CPU, memory, disk IOPS, network, money) is closest to its limit. Writing assumptions separately from the arithmetic matters because when someone disagrees, you change one input and recompute instead of arguing about the whole answer.
Assumptions as data
Keep assumptions in one place so a single change flows through every result.
assumptions = {
"dau": 5_000_000, # daily active users
"posts_per_user_day": 2,
"reads_per_user_day": 50,
"post_size_bytes": 1_000,
"retention_days": 365 * 5,
}
SECONDS_PER_DAY = 86_400
a = assumptions
write_qps = a["dau"] * a["posts_per_user_day"] / SECONDS_PER_DAY
read_qps = a["dau"] * a["reads_per_user_day"] / SECONDS_PER_DAY
storage_tb = a["dau"] * a["posts_per_user_day"] * a["post_size_bytes"] * a["retention_days"] / 1e12
print(f"write QPS ~ {write_qps:,.0f}")
print(f"read QPS ~ {read_qps:,.0f}")
print(f"5-year text storage ~ {storage_tb:.1f} TB")
Output:
write QPS ~ 116 read QPS ~ 2,894 5-year text storage ~ 18.2 TB
Say the assumption out loud
In an interview, say each assumption before using it: 'I will assume 5 million daily users, each posting twice a day.' The interviewer can then correct you early, and you get credit for structure even if a number is unrealistic.
Sanity checks that catch big errors
After computing, compare each result with a reference point. Per-user check: divide the total by users; 10 GB per user per day for a text app means a unit slipped somewhere. Per-machine check: if one result implies a single server doing more than its realistic limit, you need more servers or a different design. Known-system check: compare with public, order-of-magnitude facts, such as a popular app having millions, not billions, of writes per second. Unit check: confirm bits versus bytes and per-second versus per-day. These checks take seconds and catch the most common mistake in estimation, which is a factor of 1,000 from a unit conversion, not a subtle modelling error.
Quick check: In the five-step process, what is the main benefit of listing assumptions separately from calculations?
- It makes the arithmetic more precise
- It removes the need for sanity checks
- When an input is challenged you change one value and recompute instead of redoing the whole estimate
- It guarantees the estimate matches production
Answer
When an input is challenged you change one value and recompute instead of redoing the whole estimate — Separated assumptions make the estimate easy to revise and make disagreements specific: people argue about one input, not the whole result.