Skip to content

Lesson 3 of 9 · 26m

Back-of-Envelope Capacity Estimation That Survives Review

Use rough arithmetic, units, peak factors, and storage growth estimates to make architecture choices proportional to real load.

Capacity estimation is not a performance. Nobody needs you to memorize the latency of every AWS component. You need arithmetic honest enough to expose the order of magnitude. The classic failure is designing a planetary system for a departmental workload — or worse, casually hand-waving a workload that actually does planetary numbers every hour.

Use units and carry them

Start with monthly or daily events, convert to per-second averages, then apply a peak factor:

2 billion reads/month
seconds/month ~= 30 * 24 * 3600 = 2,592,000
average reads/s ~= 2,000,000,000 / 2,592,000 = 772
peak factor 4x -> about 3,100 reads/s

Write units next to every number. If you cannot explain whether a number is requests per second, bytes per second, or objects per day, it is not an estimate.

Know a small table of useful constants

You do not need exotic precision. These values are enough for most first passes:

1 day                 86,400 seconds
1 million requests    ~12 requests/s averaged over a day
1 KB object           1,024 bytes
1 TB                  ~1 trillion bytes
SSD random read       tens of microseconds to low milliseconds
network in-region     often sub-millisecond to a few milliseconds
cross-region network  tens to hundreds of milliseconds
disk/SSD throughput   hundreds of MB/s per modern device

The point is not exact hardware trivia. The point is knowing that network calls, disk seeks, serialization, and lock contention have different costs.

Estimate storage as a growth problem

Storage calculations must include object size, replication, indexes, and time:

100 million links
metadata 300 bytes/link -> 30 GB raw
indexes + overhead 2x -> 60 GB
3 replicas -> 180 GB
growth 5 million/month -> +15 GB raw/month before replication

This changes design. 180 GB can fit comfortably on one modern database server, though availability may still require replicas. 180 TB cannot. Do not jump to distributed storage because a number sounded large.

Estimate bandwidth separately from requests

A tiny request can trigger a large response or fan-out. Include payload size:

3,100 reads/s * 600 byte redirect response ~= 1.9 MB/s
12,000 image requests/s * 250 KB ~= 3 GB/s

Redirect traffic and media delivery are different architectures. The first is cheap compute; the second is bandwidth economics and caching.

Use ranges when facts are uncertain

Say "between 700 and 1,500 writes per second at peak" if inputs are uncertain. Then test whether the design boundary changes across the range. If both ends fit a single relational primary, the uncertainty does not matter. If one end requires partitioning, say exactly where the threshold lies.

Field notes

  • Never divide a daily total by 100,000 and call the result precise; that arithmetic hides peak behavior.
  • Peak factor should come from business shape: 2x for steady APIs, 5-10x for consumer daily cycles, much higher for launch events.
  • Include amplification: one user action may write metadata, audit logs, search indexes, metrics, notifications, and replicas.
  • Rough estimates are decision tools. Once they stop changing decisions, stop refining them.

Was this lesson helpful?

Sign in to rate