sagelearnai

Back-of-Envelope Estimation

Estimation is not a maths test. It is how you decide whether a design needs a cache, a sharded database or object storage, in under two minutes. Interviewers want round numbers, stated assumptions and a decision at the end.

Learning objectives

  • Convert daily users and actions into average and peak requests per second.
  • Estimate storage and bandwidth with powers of ten.
  • Recall the latency and throughput numbers that drive design decisions.
  • Use the result to make a decision, and stop when it has done its job.
UsersDAU, actions QPSavg and peak Storageper day / year Bandwidthin and out Decisioncache? shard?
Client / userService / computeData storeNetwork / edgeObservability
From users to design decisions. Estimation exists to change the design. Stop as soon as a number tells you something: "40K reads/s needs a cache", "2 PB needs object storage".
Text description

Start from daily active users and actions per user, derive average and peak queries per second, then storage per day and per year, then bandwidth in and out, and finally use those numbers to decide on things like caching and sharding.

The shortcuts

FactValue to remember
Seconds in a day~86,400 ≈ 10⁵ (round to 100K)
1M requests per day≈ 12 per second
1B requests per day≈ 12K per second
Peak vs averageUsually 2–10×; use 3× unless told otherwise
1 KB × 1M1 GB
1 KB × 1B1 TB
1 MB × 1B1 PB

Latency numbers worth knowing

Exact values change with hardware; the orders of magnitude are what matter.

OperationApproximate time
Main memory reference~100 ns
Read 1 MB sequentially from memory~10–50 µs
Round trip within a data centre~0.5 ms
Read from SSD (random 4 KB)~0.1 ms (100 µs)
Redis GET over the network~0.5–1 ms
Simple indexed database query~1–10 ms
Cross-continent round trip~100–150 ms

And rough single-node throughput: a well-tuned Redis node handles ~100K+ simple operations/s; a single relational primary typically sustains thousands to low tens of thousands of simple writes/s depending on hardware and schema; a Kafka partition handles tens of MB/s.

A worked example: a photo-sharing app

Assumptions (say them out loud): 100M daily active users, each uploads 0.1 photos a day and views 50; a photo plus its thumbnails is 2 MB; keep everything for 10 years.

  • Writes: 100M × 0.1 = 10M uploads a day ≈ ~120/s, peak ~400/s. Easy for one database for metadata.
  • Reads: 100M × 50 = 5B views a day ≈ ~58K/s, peak ~170K/s. Decision: serve images from a CDN and cache metadata; reads dominate.
  • Storage: 10M × 2 MB = 20 TB a day → ~7 PB a year → ~70 PB in 10 years. Decision: object storage (S3-like) for images; only metadata in the database.
  • Bandwidth: 5B views × ~200 KB (a feed-sized image) ≈ 1 PB a day out ≈ ~12 GB/s average. Decision: the CDN is mandatory.

Each number led to a decision. That is the point.

Try it

Change the inputs to model a chat app (DAU 500M, 40 messages each a day, 100 bytes per message) and a URL shortener (100M new links a month ≈ 3.3M a day; enter DAU 3.3 and 1 write per user).

When to skip estimation

If the interviewer says the scale is small, or the numbers would not change your design, say so and move on. Some interviewers prefer you estimate only when a decision depends on it.

Self-check

Estimate the read QPS and storage for a service with 50M DAU who each post twice and read 100 posts a day, with 1 KB posts.
  • Writes: 100M/day ≈ 1.2K/s; reads: 5B/day ≈ 58K/s (peak ~170K/s) → cache and replicas.
  • Storage: 100 GB/day ≈ 36 TB/year → fits a sharded database; mention replicas and backups.
Which latency numbers do you keep in your head and why?
  • Memory ~100 ns, SSD ~100 µs, in-DC round trip ~0.5 ms, cache GET ~1 ms, DB query ~1–10 ms, cross-continent ~100+ ms.
  • They decide what can be in the request path within a latency budget.

Last reviewed 2026-11-05.