System Design AI

Back-of-the-Envelope Estimation for System Design Interviews

When the interview clock starts ticking, you don’t have time to pull up a spreadsheet. You need a mental model that turns a vague product description into concrete numbers you can argue about. Below is a step-by-step recipe that works for most web-scale services – from a social feed to a URL shortener – and shows how those numbers guide architecture choices.

1. Anchor Numbers to Keep in Your Head

The whole exercise collapses to a few simple ratios. Memorize these and you’ll never be stuck staring at a blank board.

  • Seconds per day: 86,400. Roughly 1 million requests a day is about 12 requests a second. For quick sums, drop the odd 400 seconds, so a day is about 86 k seconds.
  • Typical request-response size: 1 KB for a JSON API call, 10 KB for a page with images, 100 KB for a video thumbnail. Keep the order of magnitude.
  • User growth factor: Most services see a peak-hour load of 2–3× the daily average. Use 3× as a safe upper bound.
  • Safety margin: Add 30 % to any capacity estimate to cover spikes and unknowns.

These anchors let you convert any vague statement – “a million users per day” – into a concrete QPS, storage, and bandwidth figure in under a minute.

2. From Daily Active Users to Queries-Per-Second

2.1 Basic QPS Calculation

Start with the daily active user (DAU) count the interviewer gives you. If they say 10 million DAU, the average per-second load is:

Code
10,000,000 users / 86,400 seconds ≈ 116 users/second

That’s the average QPS. Most interviews expect you to talk about the peak QPS, so multiply by the peak factor (≈3):

Code
116 × 3 ≈ 350 QPS peak

2.2 Adjust for Request Frequency

If each user generates 5 requests per session, multiply again:

Code
350 QPS × 5 ≈ 1,750 requests/second

Round to the nearest hundred – 1.8 k RPS – and you have a solid starting point.

3. Estimating Storage Requirements

Storage is often the least discussed metric, but it drives choices like database sharding, compression, and data-lifecycle policies.

3.1 Per-User Data Size

Pick a realistic per-user footprint:

  • Profile metadata (username, email, timestamps): ~500 bytes
  • Activity log (last 100 actions): ~5 KB
  • Media thumbnails (optional): ~2 KB

A typical per-user size lands around 8 KB.

3.2 Total Storage

Multiply by the total number of users you expect to keep. For a service that retains 30 days of activity for 10 million DAU:

Code
10,000,000 users × 8 KB ≈ 80 GB

Add a 30 % safety margin → ~104 GB. That tells you whether a single-node SSD can hold the data or if you need a distributed store like DynamoDB or Cassandra.

4. Bandwidth – How Much Data Flies Over the Wire?

Bandwidth is the product of QPS and average response size. If the API returns JSON payloads of about 1 KB:

Code
1,750 RPS × 1 KB ≈ 1.75 MB/s

Convert to megabits per second (1 byte = 8 bits):

Code
1.75 MB/s × 8 ≈ 14 Mb/s

Add the 30 % safety margin → ~18 Mb/s. That fits comfortably on a single 100 Mb/s internet connection, but if you anticipate video streaming or large images, the bandwidth calculation will push you toward a CDN.

5. Turning Numbers Into Design Decisions

Now that you have ball-park figures, use them to justify architectural choices.

MetricTypical ThresholdDesign Implication
QPS ≤ 5 kSmall-to-medium servicesSingle-region autoscaling group, no need for global load balancer
QPS > 5 kLarger trafficIntroduce a front-end CDN or edge cache, consider multi-AZ deployment
Storage ≤ 200 GBFits on a single nodeUse a relational database with read replicas
Storage > 200 GBDistributed data neededShard across NoSQL store, enable tiered storage
Bandwidth ≤ 20 Mb/sSimple APIDirect VPC traffic, no CDN required
Bandwidth > 20 Mb/sMedia-heavy trafficDeploy a CDN, enable HTTP/2 multiplexing

When the interviewer asks “Why not just add more instances?” you can point to the bandwidth ceiling: adding compute won’t increase the network pipe. Conversely, if the storage estimate exceeds a single node’s capacity, you can argue for a partition key that spreads users evenly across shards.

6. Common Pitfalls and How to Avoid Them

  • Forgetting the safety margin. A design that barely meets the raw estimate will look fragile under real-world spikes.
  • Mixing units. Always convert to the same base (seconds, bytes) before dividing. Double-check any division you perform.
  • Assuming uniform traffic. Real traffic is bursty; using the 3× peak factor covers most cases, but you can mention diurnal patterns if you have time.
  • Over-engineering. If your QPS is under 1 k, a full-blown micro-service mesh is unnecessary – a monolith with a few background workers may suffice.

7. Practice: From Prompt to Sketch

The fastest way to internalize the process is to practice on a blank canvas. Take a typical interview prompt – “design a URL shortener for 100 million links per month” – and run through the steps:

  1. Convert 100 million links/month to links created per day (≈3.3 million/day) and then to QPS.
  2. Estimate per-link storage (say 200 bytes) and total storage.
  3. Compute bandwidth using a typical redirect response (≈0.5 KB).
  4. Choose a datastore (e.g., DynamoDB) and a caching layer (e.g., CloudFront) based on the numbers.

System Design AI offers a canvas where you can draw the components, annotate each with the numbers you just derived, and get AI feedback on completeness. Use it to rehearse the flow until you can sketch the whole design in under two minutes.

How to practice this

  1. Pick a common service (feed, chat, file upload) and write down the DAU the interviewer might give.
  2. Run the three-step calculation – QPS, storage, bandwidth – using the anchor numbers above.
  3. Map each metric to a concrete architectural choice and sketch it on a whiteboard or the System Design AI canvas.

Repeating this loop with different services builds the intuition needed to turn any vague requirement into a defensible design in the interview room.

Questions people ask

What numbers should I memorize for quick capacity estimates?

Keep seconds per day (86,400), typical request size (1 KB for JSON, 10 KB for a page), a 3× peak-hour factor, and a 30 % safety margin. These anchors let you convert daily users to QPS, storage, and bandwidth in seconds.

How do I estimate peak QPS from a daily active user count?

Divide the DAU by 86,400 to get average QPS, then multiply by about 3 for peak load. If each user makes multiple requests per session, multiply again by the request frequency.

When should I consider adding a CDN to my design?

If the bandwidth estimate exceeds roughly 20 Mb/s or if the service serves large media assets, a CDN reduces origin load and improves latency. For small JSON APIs under that threshold, a CDN is usually unnecessary.

What safety margin is realistic for interview estimates?

Adding 30 % to each capacity figure (QPS, storage, bandwidth) covers typical traffic spikes and unknowns. Mention the margin explicitly to show you’re thinking about real-world variability.