System design 0/3

System design, Foundations

What is a back-of-envelope estimate?

Also called capacity estimation, back-of-the-envelope calculation

245 words · 2 min read

Capacity estimation translates user activity into the rates and volumes a design must support. A user count becomes useful only after you specify what those users do, how much data each operation moves and the interval over which the activity occurs. Those assumptions connect a product requirement to a server, storage or network limit.

Suppose one million daily active users each read 20 posts and publish two posts. Assuming one request per action, the service receives 22 million requests per day, about 255 per second on average. If a stated peak factor is five, peak demand becomes about 1,273 requests per second. Neither the request rate nor the peak factor follows from the user count alone.

Cancel the units before rounding the answer

Dimensional analysis checks a calculation by following its units. Users multiplied by requests per user per day gives requests per day. Dividing by 86,400 seconds per day gives requests per second, often called QPS. Keeping units beside intermediate values catches a missing day-to-second conversion before it becomes a machine count.

Change one assumption at a time

Which results does each assumption move? Double the reads per user, then the writes, then the retention period and the number of copies, and compare peak QPS, bandwidth and stored bytes.

Average requests / s

254.6 QPS

1,000,000 users × (20 reads + 2 writes) ÷ 86,400 s/day

231.5 read QPS + 23.1 write QPS

Peak requests / s

1,273.1 QPS

254.6 average QPS × 5 peak factor

Peak read payload

37 Mbps

1,157.4 peak reads/s × 4,000 B × 8 bits/B ÷ 1,000,000

Logical retained data

60 GB

2,000,000 writes/day × 1,000 B × 30 days

Data across all copies

180 GB

60 GB × 3 total copies

Servers before failure redundancy

2

Round up 1,273.1 QPS ÷ (1,000 measured QPS × 70%)

Decimal units: 1 KB = 1,000 B. One new retained record per write. Storage excludes indexes, backups and logs; bandwidth excludes protocol overhead. 70% utilisation leaves spare capacity, and failure redundancy requires a separate calculation.

Increasing peak traffic changes the serving requirement without changing the day’s stored volume. Increasing retention changes stored volume without changing incoming QPS. Those separate effects tell you whether to investigate serving capacity, bandwidth or storage.

Back-of-envelope estimates Estimate average and peak traffic, calculate storage growth, and identify what still needs measuring. Read the full lesson