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 an HTML page without its images, 100 KB for an image such as a video thumbnail. Keep the order of magnitude.
  • Peak factor: A common rule of thumb is that peak-hour load is 2–3× the daily average; use 3× unless the interviewer gives you a traffic shape.
  • 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 is a user arrival rate, not a request rate: it equals the average QPS only if each user makes one request a day. Most interviews expect you to talk about the peak, so multiply by the peak factor (≈3):

Code
116 × 3 ≈ 350 users/second at peak

2.2 Adjust for Request Frequency

If each user makes 5 requests a day, multiply again to get requests:

Code
350 users/second × 5 ≈ 1,750 requests/second (peak QPS)

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 stores 10 million users (count every stored account, which is usually more than the 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
Peak QPS in the hundreds to low thousandsSmall-to-medium servicesA few stateless instances behind a load balancer in one region, spread across zones; one primary database
Peak QPS in the tens of thousands or moreLarger trafficA cache in front of the database, read replicas, and partitioning for the hottest data
Storage up to a few TBFits on one well-provisioned nodeA relational database with read replicas
Storage or writes beyond one primaryDistributed data neededShard the data, and move cold data to cheaper storage
Small JSON responses, users near the originSimple APIServe from the origin; a CDN is optional
Large media, or users far from the originMedia-heavy or global trafficPut a CDN in front of the static and media bytes

When the interviewer asks “Why not just add more instances?” you can point to the shared bottleneck the numbers reveal, such as a single primary database's write rate or storage: more stateless instances do not relieve it. 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.

Sketch the components on paper or a whiteboard and annotate each with the numbers you just derived, then compare the result with the free worked design, Design a URL Shortener: start with the board for your level. With Pro ($10/month), you can draw it on the practice canvas instead and have the Coach review it. Rehearse until you can run the estimates and sketch the high-level design in a few 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, with Pro, on the System Design AI practice 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 an HTML page without images), 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?

Multiply DAU by the requests each user makes per day, divide by 86,400 to get average QPS, then multiply by about 3 for peak load.

When should I consider adding a CDN to my design?

If the service serves large static or media assets, or users far from the origin, a CDN reduces origin load and improves latency. For small JSON APIs serving one region, a CDN is usually optional.

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.