AI System Design
← Learn
Level 1beginner

Back-of-the-Envelope Estimation

How many servers do you need? Guess — then prove it.

Depth:
1

Mission

Your manager asks how much hardware a new service needs before anything is built. Turn users, actions and payload sizes into QPS, servers and storage — then provision it and see if you were right.
2

Interactive Simulation

Before we explain anything — play. Push it until it breaks, then fix it.

Disk full — 5 years of data at 3× replication needs ~110 TB.

Show your work

Estimate first, then reveal. Interviewers care about the reasoning and round numbers, not decimals.

1 day
86,400 s ≈ 10⁵ s
1M req/day
≈ 12 req/s
2¹⁰ / 2²⁰ / 2³⁰ / 2⁴⁰
KB / MB / GB / TB
Memory read 1 MB
≈ 0.25 ms
Same-DC round trip
≈ 0.5 ms
Disk seek
≈ 10 ms
99.9% uptime
≈ 8.8 h down / year
99.99% uptime
≈ 53 min down / year
Requests
7.6K/s
Latency
127ms
p95 381ms
Error rate
8.3%
CPU
76%
DB load
100%
Est. cost
$500/mo
illustrative
Accepted
7.0K/s
Rejected
631/s
Latency (ms)
Error rate (%)

Workload

Average write size

Your estimate: provision it

System Score91
3

What just happened?

Daily users × actions ÷ 86,400 gave average QPS; multiplying by a peak factor told you how many servers survive the busiest minute. Writes × size × retention × replication gave storage. Too few and the system fell over; too many and the bill exploded.

4

The concept

Back-of-the-envelope estimation is quick, rounded arithmetic that sizes a system before you design it. The core moves: convert daily volume to per-second (÷ ~10⁵), apply a peak multiplier, divide by per-server capacity, and multiply storage by retention and replication. Know your powers of two, rough latency numbers (memory ≪ network ≪ disk), and what each extra nine of availability means in downtime.

5

Trade-offs

Nothing is free. Here's what this solution costs you.

Precision vs speed
Exact numbers waste interview minutes; the order of magnitude is what changes the design.
Headroom vs cost
Provisioning for peak means paying for idle capacity most of the day.
Assumptions drift
A 2× wrong guess on payload size is a 2× wrong storage bill — state assumptions explicitly.
6

In the real world

Capacity planning before launches, cloud cost forecasts, and the first five minutes of nearly every system design interview.

7

Mini quiz

Question 1 of 30 correct

A service gets 100M requests per day. Roughly how many per second on average?

8

Interview me

The app becomes your interviewer. One question, in your own words.

9

Boss challenge

Right-size a 150M-user service

Set daily users to 100M+ and provision servers and storage for your workload.

Goal: Provide enough servers and storage for peak and full retention — but never more than 2× what's needed.

Use the simulator above with no hints. These checks update live as you play.

10

Interview question

“Estimate QPS, peak QPS, storage over 5 years and bandwidth for a Twitter-like service with 150M daily users. State your assumptions.”

Next: Rate Limiter