Cruxly

Cruxly › System design › Running the Design Interview

Estimating the Load

get to one number that constrains everything else

Open the interactive lesson

Turn the scope into figures: requests per second, bytes stored per year, bandwidth at peak. You are not trying to be accurate. You are trying to find out which order of magnitude you are in, because that is what decides whether this runs on one box or two hundred.

You are estimating to make one decision

Estimation is not a ritual. It exists to answer questions like:

Numbers worth memorising

Round aggressively. These are the only ones you need.

QuantityUse
100,000 seconds ≈ 1 daydaily ÷ 100k = average per second
3 × 10⁷ seconds ≈ 1 yearstorage per year
1 million ≈ 10⁶, 1 billion ≈ 10⁹keep exponents, not digits
Peak ≈ 2–3× averagealways state the multiple you used
1 KB — a text record with metadatarows, messages, events
1 MB — a photo; ~40–100 MB/min — 1080p videoanything with media dominates storage
~100 ns — memory reference; ~100 µs — NVMe random readwhy an in-memory cache beats disk
~0.5 ms — round trip within a datacentre; ~100 ms — cross-continentwhy you cache, and why you place data near users
~1–10k req/s — one app server; ~100k+ ops/s — one Redis nodehow many boxes a tier needs
~10–20k small durable writes/s — one OLTP primarythe "do I need to shard?" line

Don't confuse that last number with bulk-load speed. A single node can ingest on the order of a million rows per second with COPY or big batched inserts, but that isn't transactional traffic — each user-facing write is its own durable commit, and that's what caps a primary in the tens of thousands per second (more with careful batching and fast disks).

~1,000/s ~100,000/s one primary: ~10–20k durable writes/s your system: 5,000/s comfortably under one primary — you do not need to shard, and you should say so
The workhorse number isn't for showing off arithmetic — it's for recognising when the honest answer is "one box is fine."

A worked estimate

50 million daily active users, each sending 40 messages a day, each message 1 KB.

GIVEN 50M users/day 40 msg each 1 KB each DERIVED 20k writes/s · 50k peak 60k reads/s 700 TB/yr raw · ~2 PB ×3 hot set: 80 GB / hour THEREFORE exceeds one primary → partition by conversation only 3:1 — writes are the constraint cold tiering is required, not optional last hour fits one cache cluster comfortably Four numbers. Four decisions. Every one of them now defensible. The arithmetic is not the deliverable — the right-hand column is. A candidate who produces the left column and stops has done the ritual, not the work.
Every number you compute should terminate in a decision. If it doesn't, you didn't need to compute it.

@@ 1 | Writes 50M × 40 = 2 × 10⁹ messages/day. Divide by 10⁵ seconds ≈ 20,000 writes/second average, so ~50,000 at peak.

@@ 2 | Reads A chat is read more than written — assume 3 reads per message: 60,000 reads/second average.

@@ 3 | Storage 2 × 10⁹ × 1 KB = 2 TB/day, about 700 TB/year of raw data — and about 2 PB/year stored once you multiply by a replication factor of 3, which is the number the storage bill actually sees. That is a partitioned store with a retention policy, not one Postgres box.

@@ 4 | Hot set People almost only read recent messages. Last 24 hours is 2 TB — too much for one cache node, fine for a modest cluster. Last hour is ~80 GB, which fits comfortably.

:::key What this tells me — this is the entire point

:::

Say the ratio, not just the totals

the ratio 1000:1 — content site cache aggressively, replicate reads ~1:1 to 3:1 — messaging, logging the write path IS the system 1:10,000,000 — fan-out the whole design problem for a feed One number, and the direction of the entire design follows from where it lands.
The ratio doesn't just describe the system — for these three shapes, it *is* the design brief.
RatioSystemWhat it dictates
1000:1 read:writeA content siteCache aggressively, denormalise freely, replicate reads. The write path can be slow
~1:1 to a few:1 read:writeMessaging, loggingCaching and replicas buy little — the write path is the system
Write-heavy, rare readsTelemetryAppend-only storage, batch compaction; reads are allowed to be slow
1:10,000,000 fan-outA celebrity posting to 10M followersThat single number is the whole design problem for a social feed

:::key One ratio beats eight totals If you produce one ratio and design around it, you have done more than a candidate who produced eight totals and drew no conclusion from any of them. :::

Doing the arithmetic without embarrassing yourself

Work in exponents, not digits.

50 million × 40 = ... "two thousand million"?
(counting zeros under pressure — this is where people slip)
5×10⁷ × 4×10¹ = 20×10⁸ = 2×10⁹
(mantissas multiply, exponents add — no zeros to drop)

:::key On getting it wrong

:::

How to say it in the interview

"Let me get rough numbers before I draw anything — I want to know whether this is a single-database problem or a sharding problem, and that's a factor-of-a-thousand question."

Checklist

Practice this interactively
Share this lessonWhatsAppLinkedInX

Related lessons