A14Advanced

Capacity Estimation Intuition

30 minWhen planning new projects

Format: Quickly estimate the resources a system needs.

Back-of-the-Envelope Rules:

1 day ≈ 100,000 seconds (86,400, rounded up)
1 month ≈ 2.5 million seconds
1 year ≈ 30 million seconds

1 KB = 1000 characters (approximately 500 Chinese characters)
1 MB = 1000 KB = one medium-quality photo
1 GB = 1000 MB = approximately 250 MP3 songs
1 TB = 1000 GB

Common latencies:
- Memory read: 0.1 ms
- SSD read: 1 ms
- Database query: 5-50 ms
- Same-city network: 1-5 ms
- Cross-country network: 100-300 ms

Exercises: Estimate the following scenarios:

  1. A social app with 1 million users, each posting 2 times per day (average 200 characters), how much storage is needed per year?
  2. An API handling 1000 requests per second, each taking 50ms to process — how many servers are needed?
  3. A system sending 100,000 emails per day, each email 10KB — what's the monthly bandwidth?

The goal isn't precise calculation, but building a "sense of magnitude" — knowing whether it's GB-level or TB-level, whether you need 1 server or 100.

My Notes