Catalog My learning Blog
System Design Roadmap: 100-Day Course for Engineers · Phase 1 · Lesson 7 · 5 min read

Back-of-the-Envelope Estimation for System Design

On this page
  1. Why estimate before you design
  2. How to estimate requests per second and storage
  3. Worked example: estimating a status feed
  4. How to estimate cache size
  5. From estimates to server and pool sizing
  6. Common estimation mistakes
  7. Check yourself

Why estimate before you design

"We're building a status feed for our app." Is that one server and a PostgreSQL database, or a fleet of caches and a sharded store? You can't tell from the description. A few minutes of arithmetic can. Back-of-the-envelope estimation means rough math with rounded numbers, good enough to choose an architecture, not to buy hardware.

How to estimate requests per second and storage

  1. Daily active users (DAU) × actions per user per day = actions per day.
  2. Actions per day ÷ about 100,000 (a day is 86,400 seconds) = average per second.
  3. Average × 2 to 3 = peak per second. Traffic is never flat.
  4. Item size × items per day × days kept × replication factor = storage.

Handy roundings: 1 million per day ≈ 12 per second. 1 million rows of 1 KB ≈ 1 GB. A year ≈ 30 million seconds.

Daily users and payload size roll up into average and peak requests per second and yearly storage with a few multiplications.
Daily users and payload size roll up into average and peak requests per second and yearly storage with a few multiplications.

Worked example: estimating a status feed

10 million DAU; each posts 2 updates a day and reads their feed 20 times a day.

Code
Writes   10M × 2  = 20M/day   ÷ 86,400 ≈ 230/s average,  × 3 ≈ 700/s peak
Reads    10M × 20 = 200M/day  ÷ 86,400 ≈ 2,300/s average, × 3 ≈ 7,000/s peak
Ratio    about 10 reads per write

Storage  20M posts × 1 KB     ≈ 20 GB/day
         × 365                 ≈ 7 TB/year
         × 3 copies            ≈ 21 TB/year of raw disk

What the numbers decide:

  • 700 writes per second at peak is comfortable for one well-tuned relational primary. No sharding yet.
  • 7,000 reads per second is more than it looks, because a feed read isn't one row. It fetches posts from everyone the user follows, sorts them, and returns the top 20. If each read touches 200 candidate posts, that's 1.4 million rows examined per second. Cache the assembled feed, or precompute it (Day 40).
  • 21 TB a year of raw disk can technically live on one database, but backups, restores and index rebuilds of that size take hours. Keep recent posts in the primary store and move older ones to cheaper storage within a year or two.

Each number turned into a decision. That's the point: an estimate nobody acts on was wasted time.

How to estimate cache size

Once the numbers say "cache it", the next question is how much memory. Cache the hot set, not everything. If 20 percent of users make most of the reads, and each cached feed is 20 post ids plus metadata, about 2 KB:

Code
10M DAU × 20% × 2 KB ≈ 4 GB

That fits comfortably in one Redis node, with room for replication. If the answer had been 4 TB, you'd know you need a different design, like caching post objects separately from feed lists.

From estimates to server and pool sizing

The same numbers feed Little's Law from Day 3. If each feed read takes 50 ms, 7,000 reads per second means about 350 requests in flight. Spread over 4 API instances, each needs roughly 90 concurrent request slots and enough database connections, which tells you how to size thread pools and connection pools.

Bandwidth too: 7,000 responses per second × 20 KB each ≈ 140 MB/s, a little over 1 Gbit/s. That's worth knowing before you pick instance network limits or a CDN. And if posts can include images, those dominate: 20M posts × 10 percent with a 200 KB image is 400 GB a day, 20 times the text. Images go to object storage and a CDN (Day 35), not the database.

Common estimation mistakes

  • Forgetting peak. Averages don't break systems; peaks do.
  • Forgetting replication and indexes. Raw data × 3 copies, plus indexes, plus backups.
  • False precision. "2,314.8 requests per second" suggests accuracy you don't have. Say "about 2,300" and move on.
  • Not writing assumptions down. "1 KB per post" is a guess; label it so others can challenge it.

Check yourself

5M × 4 × 2 KB = 40 GB a day, about 14.6 TB a year, about 44 TB with 3 copies.

A single server or single database handling every request directly. It points to horizontal scaling, caching and probably partitioned data from the start.

The work per request. That's 150 million rows examined per second, which no single database does. Index it, precompute results, or use a search engine.

Traffic is uneven across the day. A common rule of thumb is that peak is two to three times the daily average, and launches or sales can be far higher. Capacity must cover the peak, so an average-only estimate under-sizes the system.

Forgetting replication and backups when sizing storage, using averages instead of peaks, ignoring index and metadata overhead, mixing up bits and bytes, and treating requests per second as the only load measure when each request may do very different amounts of work.