LogoMasst Docs

Estimate

๐Ÿ—๏ธ How to estimate scale in a High-Level Design (HLD) Interview?

Estimating scale helps you choose the right technologies, plan for growth, and communicate your understanding of real-world systems.


โœ… What to Estimate?

  1. ๐Ÿ‘ฅ Users (DAU / MAU)
  2. ๐Ÿ”„ Requests / Query per second (RPS / QPS)
  3. ๐Ÿ“ฆ Storage
  4. ๐Ÿงฎ Bandwidth

๐Ÿ‘ฅ 1. Estimate Users

Estimate Daily Active Users (DAU) and Monthly Active Users (MAU) based on the app type.

Heuristics:

  • Social media: DAU โ‰ˆ 10โ€“30% of MAU
  • Admin/dashboard apps: DAU โ‰ˆ MAU
  • Ticketing/event apps: Spiky traffic

Example:
If MAU is 10M, assume 1โ€“3M DAU.

Say in interview:

โ€œLetโ€™s assume 5M monthly active users, and around 1M daily active users.โ€


๐Ÿ”„ 2. Requests Per Second (RPS)

๐ŸŽฏ Formula

RPS โ‰ˆ (DAU ร— Requests per User per Day) รท 10^6

Use 10^6 (instead of 86400 seconds in a day) for simplicity in interviews.

๐Ÿง  Example

  • DAU = 1,000,000
  • Avg 5 requests/day/user
RPS = (1M ร— 5) รท 1M โ‰ˆ 5 RPS

Advanced: Split by Type

  • 70% reads โ†’ 3.5 RPS
  • 30% writes โ†’ 1.5 RPS

โ€œWeโ€™ll need to optimize for reads and cache aggressively.โ€


๐Ÿ“ฆ 3. Estimate Storage

๐ŸŽฏ Formula

Storage = Avg object size ร— Number of objects

Example

  • 1 post = 500 bytes
  • 10M posts/month = 10^6 posts/month
Storage = 500 bytes ร— 10^6 = ~5 GB/month

Use 10^6 (instead of 1024 take 10^3 in unit calculation) for simplicity in interviews.

  • 1-year retention = 60 GB

โ€œWeโ€™ll need ~5 GB/month, or ~60 GB/year for post storage.โ€


๐Ÿงฎ 4. Estimate Bandwidth

๐ŸŽฏ Formula

Bandwidth = RPS ร— Avg response size

Example

  • 60 RPS
  • Avg response = 50 KB
Bandwidth = 60 ร— 50 KB = 3 MB/s
  • Daily: 3 MB/s ร— 86400 = ~250 GB/day

โ€œOur outgoing traffic will be ~250 GB/day, mainly due to read-heavy load.โ€


๐Ÿ“‹ Summary Table

MetricFormulaExample
UsersEstimate DAU from MAUMAU = 10M โ†’ DAU โ‰ˆ 1โ€“3M
RPS(DAU ร— reqs/day) รท 10^6(1M ร— 5) รท 10^6 = ~5 RPS
StorageSize/item ร— # of items500 B ร— 10M = ~5 GB/month
BandwidthRPS ร— response size60 RPS ร— 50 KB = ~3 MB/s

๐Ÿ’ก Interview Power Move

Say something like:

โ€œGiven 1M DAU and ~5 RPS, we expect read-heavy traffic, so weโ€™ll cache results using Redis/CDN. Storage needs are modest (~5 GB/month), and bandwidth can be optimized via compression.โ€


Tip: Clear, quantitative estimates show you understand real-world system constraints and can communicate trade-offs effectively.