Interview's MateSystem Design
Interview's Mate

System Design

Architecture & trade-offs

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
System Design topics
Lesson 1/ 31
Fundamentals & Networking

Back-of-the-Envelope Estimation

Translate product scale into QPS, bandwidth, storage, and memory numbers in two minutes.

BeginnerQPS · Storage · Bandwidth3 quiz questions0/3 subtopics done
Practice in AI HLD
In plain wordsDiagramTheorySubtopics (3)Step by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice
Deep-dive subtopics (3) - 0/3 completed
QPS & Peak Traffic Math

Turn daily active users into requests per second and realistic spike numbers.

Beginner
Storage, Bandwidth & Cache Sizing

Calculate 5-year disk growth, network throughput, and how much RAM your cache needs.

Beginner
Latency Numbers Every Engineer Should Know

Compare CPU, RAM, Redis, SSD, and cross-continent network speeds at a glance.

Beginner

In plain words

Before building anything, do quick rough math to learn how big the system needs to be: how many users, requests, and how much storage. You only need the right ballpark, not exact numbers.

Think of it like…

Checking your luggage weight at home before going to the airport - rough numbers tell you immediately whether one bag works or you need two.

Where you’ve seen it

A photo app with 10M daily users, each uploading 2 photos of 2 MB, stores about 40 TB of new data every day. That one number tells you a single server’s disk is nowhere near enough.

Words you’ll hear

QPS
Queries per second: how many requests hit the system each second.
DAU
Daily active users: how many people use the product on a typical day.
Peak traffic
The busiest moment, often 2–3× the average. Design for this, not the average.
Read:write ratio
How many times data is read for each time it is written.

Visual diagram

Loading interactive diagram
Loading interactive exercise

Theory & deep dive

Why rough math beats guessing

In system design, you rarely need exact numbers, because real traffic changes every hour. What you DO need is the right order of magnitude: will this fit on one $50 database server, or does it need 50 shards and a CDN?

Back-of-the-envelope estimation bridges product requirements ("100 million users") and hardware reality ("a single SSD holds ~4 TB and a single PostgreSQL primary handles ~5,000–15,000 writes/sec").

Worked example: Short URL service

Suppose 100M new URLs are created per month. 100M / (30 × 10⁵) ≈ 33 writes/sec. With a 100:1 read/write ratio, reads are ~3,300 QPS. Each URL row is ~500 bytes, so 5 years (60 months) is 6B rows × 500 B = 3 TB - easily fits in one sharded SQL cluster or small NoSQL table.

Key takeaway: Always convert product numbers into QPS, storage, bandwidth, and RAM, then immediately use those numbers to pick components.

Latency numbers every engineer should recognize

Memory is roughly 1,000× faster than an SSD, and a local SSD is roughly 100× faster than sending a packet across an ocean. Knowing this ladder explains why caches, CDNs, and batching exist.

When a user in Mumbai hits a server in Virginia, the speed of light alone adds ~150 ms per round trip - no amount of faster CPU on the server can fix physics. Moving static files to a nearby CDN edge cuts that wait to ~15 ms.

Key takeaway: Memory ≈ nanoseconds/microseconds, SSD/local RPC ≈ ~0.5 ms, cross-continent network ≈ ~100–150 ms.

Designing for peak, not average

Average QPS hides traffic spikes. Food delivery apps spike at lunch and dinner; ticketing apps spike 20× the second concert seats go on sale. Multiplying average QPS by 2×–5× gives you a realistic peak target.

Also remember the difference between Bytes (storage, file sizes) and bits (network speed). A 10 MB/s stream uses 80 Mbps of network bandwidth.

Key takeaway: Multiply average QPS by 2–5× for peak, and multiply bytes by 8 to get network bits/sec.

How it works, step by step

Step 1 of 4
Product Scope

1. Clarify DAU and actions per user

Start from Daily Active Users (DAU) and average actions per user per day. For example, 100M DAU making 10 reads and 1 write per day.

100M × 10 reads = 1B reads/day
Key numbers at this step
DAU
100M
Reads/day
1B
Writes/day
100M

When to use it & trade-offs

What it is

Back-of-the-envelope estimation uses rough powers of 2 and 10 to size compute, cache, storage, and network capacity before drawing architecture boxes.

Why it matters: Interviewers use estimation to verify whether a single database or cache fits the workload or if you actually need sharding, CDNs, or async queues.

When to reach for it

  • Early in an HLD interview (3–5 minutes max) to justify architectural choices
  • Deciding whether hot working sets fit in a single Redis cluster or need tiering
  • Identifying read-heavy vs. write-heavy ratios (e.g., 100:1 vs. 1:1)

When to avoid or be careful

  • Spending 15 minutes doing long arithmetic with 4 decimal places
  • Computing numbers and never referencing them in your design decisions
  • Forgetting peak-to-average multipliers (traffic spikes at events or commuting hours)

Key Reference Numbers to Memorize

Time & Traffic Shortcuts
Best for: Quick QPS conversions

Strengths: 1 day ≈ 10⁵ sec; 1M req/day ≈ 12 QPS; 1B req/day ≈ 12k QPS.

Watch out: Rounds 86,400 to 100,000 (~15% margin), which is fine for sizing.

Storage Powers
Best for: Capacity sizing

Strengths: 10³ = KB, 10⁶ = MB, 10⁹ = GB, 10¹² = TB, 10¹⁵ = PB.

Watch out: Remember to factor in replication (3×) and index overhead (~1.3×).

Latency Ladder
Best for: Bottleneck spotting

Strengths: RAM ~100 ns, Redis ~0.5 ms, SSD read ~0.1–1 ms, same-region RPC ~0.5 ms, cross-continent ~100–150 ms.

Watch out: Tail latency (P99) under load is often 5–10× median latency.

Interview signals & numbers to know

When this topic comes up

  • DAU / MAU
  • reads per second
  • storage for 5 years
  • how much bandwidth
  • cache size

Benchmarks & rules of thumb

Seconds per day -
86,400 (~10⁵)
L1 / RAM access -
~1 ns / ~100 ns
Redis / in-memory network hop -
~0.5 ms
Cross-continent round trip -
~100–150 ms

Common mistakes & follow-ups

Common interview mistakes

  • Using exact 86,400 and getting stuck on mental division instead of rounding to 10⁵
  • Forgetting replication factor (typically 3×) and backups when sizing disk
  • Confusing bits (Mbps/Gbps) with bytes (MB/s, GB/s) - remember 1 Byte = 8 bits

Likely interviewer follow-ups

  • What happens if a celebrity triggers a 20× spike on one partition?
  • Which parts of this system are compute-bound vs. I/O-bound?
  • At what QPS would you move from one primary database to read replicas or shards?
Interview tip: State your assumptions clearly, round aggressively, and immediately tie the result back to a design decision (e.g., “~180 TB means we should shard or use object storage”).

Knowledge check

Loading quiz

Put it into practice

Design full architectures with AI feedback

Apply Back-of-the-Envelope Estimation inside real High-Level Design prompts or review Q&A flashcards.

Open AI HLD Practice →SD Interview Q&A
Next topic
Scalability