← System Design

Capacity calculator

Every design question starts with a number: how much traffic, how much storage, how much bandwidth. Change an assumption and watch what it costs — the arithmetic is shown beside each figure, because reproducing it on a whiteboard is the actual skill.

Start from

Assumptions

Estimate

Average QPS
231

= 1 million users × 20 requests ÷ 86,400 seconds

The daily average, which nothing is actually sized against.

Peak QPS
694

= 231 × 3 peak multiplier

The number that sizes the fleet. Capacity planned against the average falls over every evening.

Writes per second
23

= 231 × 10% writes

Usually the bottleneck: a single primary absorbs writes, while reads spread across replicas.

Reads per second
208

= 231 × 90% reads

What caching and replicas are for.

New data per day
2 GB

= 23 writes/s × 86,400 × 1 KB

Stored after 3 years
6.57 TB

= 2 GB/day × 365 × 3 years × 3 replicas

Replication multiplies the bill. Forgetting it is the most common way an estimate comes out three times too small.

Peak egress
1.25 MB/s

= 625 peak reads/s × 2 KB

Bandwidth is often the real cost, and the one people forget to estimate at all.

Bytes are SI — 1 KB is 1,000 bytes, as disk vendors and cloud bills count them. Storage of 1 TB is a terabyte, not a tebibyte. Mixing the two drifts an estimate about 10% with nobody noticing.

Getting it wrong in the usual ways