HLD Capacity Estimator

Back-of-the-envelope QPS, storage and bandwidth for a system design interview.

How it works

A back-of-the-envelope estimate for a system design round. Enter daily users, requests per user, the share of writes, the size of each write, the years of data and a peak factor. You get queries per second, storage and bandwidth.

The formula

average QPS = daily requests / 86,400
peak QPS = average QPS x peak factor
storage per day = writes per day x size

Worked example

10 million users x 20 requests = 200 million a day = 2,315 QPS on average and about 6,944 at 3x peak. 10% writes of 2 KB is 40 GB a day, about 73 TB in 5 years.

Good to know

Common questions

Is the peak factor fixed?
No. Two to five times is a common guess.
Does it include cache and replicas?
No. Multiply storage yourself.
Is this accurate?
It is an estimate, which is exactly what the interview asks for.

More in CS Labs & Coding.