Skip to the page

Testing a feature and estimating work · core

Back-of-the-envelope estimates: traffic, storage and cost

An estimate says its assumptions out loud, does simple arithmetic in steps, and ends by saying how it will be checked with real data. It gives a range, not a promise.

The notes

What you must know

  • State assumptions first. Example: 5 million orders a day, 8 messages per order (5 push, 2 SMS, 1 email) gives 40 million messages a day.
  • Average rate: per day divided by 86,400 (40 million is about 460 a second). Peak: if the busiest hour carries about 10% of the day, 4 million divided by 3,600 is about 1,100 a second; a sale at 5 times is about 5,500 a second.
  • Storage: records times bytes (40 million x 500 bytes = 20 GB a day, about 7.3 TB a year). Indexes add 50 to 100%, replicas more. Plan hot data (90 days in the database), older data compressed in object storage, and monthly partitions.
  • Cache memory: one item (about 2 KB plus key overhead) times the popular set (2 million items is about 4.2 GB). Caching all 20 million items would be about 42 GB, mostly for items nobody views. Set maxmemory with headroom for persistence forks and replication buffers, use allkeys-lru or allkeys-lfu, and add TTL jitter.
  • Log cost: 200 pods x 50 lines/s x 500 bytes is 5 MB/s, about 430 GB a day, about 13 TB a month. At about US$0.50 per GB ingested (CloudWatch Logs standard, us-east-1, Nov 2026) that is about US$6,500 a month. Prices vary by vendor and region: give a range.
  • Cut waste: health-check logs, debug lines left on, a log line per successful request, big request bodies. Sample success logs but keep all errors. Never cut security, audit and payment-state logs. India: CERT-In 2022 directions ask for logs kept for a rolling 180 days within India, so use a cheap archive tier.
  • Money numbers are a product decision too: 10 million SMS a day at an assumed Rs 0.15 each is about Rs 15 lakh a day, so "push first, SMS only where it matters" is worth raising.
  • Check the estimate against real rates and record sizes from production metrics in the first week.

The red pen

Common traps: mistake → fix

  • Mistake: An estimate must be exact

    Fix: a clear method with stated assumptions and a range is the goal.

  • Mistake: Average traffic sizes the system

    Fix: peak and bursts decide it.

  • Mistake: Storage is only the raw data size

    Fix: indexes, replicas and retention add several times more.

Easy to hard

Questions interviewers ask, easy to hard

  1. Estimate the notification traffic and storage for 5 million orders a day.
  2. Estimate the memory for a product cache of 20 million products.
  3. Estimate the monthly cost of our log pipeline.
  4. How do you say an estimate to a manager so it is useful?

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview