Karachi · Est. 2014
← Back to The Lab

Capacity math for system design

capacity planningestimation
About this tool

Start from daily active users and requests per user, and everything else, peak load, storage, cache size, server count, cost, falls out as a straightforward calculation. Change one assumption and the numbers move through the rest.

It covers traffic, storage, cache, bandwidth, compute, database sharding, message queues, latency budgets, availability math, and monthly cost, plus a diagram tool for sketching the architecture itself: drag on labeled component icons (or a plain box, container, or freestanding text), connect them, pick a shape, group and color them, animate the data flow between them with a traveling packet, a notification pulse, a fill bar, and more.

Every number here is an order-of-magnitude estimate. The value is in the ratios and the binding constraint, not the digits, if a result changes your architecture, verify it with a measurement before you build on it.

For background on the technique itself, ByteByteGo has a lesson on back-of-the-envelope estimation.

Capacity math for system design. Change one assumption and watch it move through the numbers below.

Inputs

Why it works

Everything downstream hangs off peak RPS, so get it first. The only constant you need is 86,400 seconds in a day, round it to 100,000 and your numbers land within 15%, which is well inside the error bars of every other guess you are making.

Size for peak, not average. A system sized for the mean is down every evening.

Derived load

Peak requests per secondRPS
peak = DAU × req/user ÷ 86,400 × peak factor
Average RPSRPS
DAU × req/user ÷ 86,400
Requests per day
DAU × req/user
Requests per month
× 30

Read / write split

Peak read RPSRPS
Peak write RPSRPS
Writes per day
Feeds the storage tab
Reads per day
Above ~100k RPS you are past what a single region and a single primary database will do comfortably. Expect sharding, regional partitioning and an edge tier in your design.
Read-heavy. This is a caching and read-replica problem. Writes are almost a rounding error, so spend your design budget on the read path.
Write-heavy. Caching will not save you. Look at LSM-tree stores, batching, and a log in front of the database.

Export

Include