Capacity Planning — Notes
Interview script
- Clarify scale: users, MAU, DAU, geography.
- Estimate avg + peak QPS.
- Estimate storage (raw + replication factor + retention + indexes).
- Estimate bandwidth (read-out per request × QPS).
- Estimate compute: per-server cap → server count + 30% headroom.
- Tier storage (hot/warm/cold).
- Identify bottleneck → that's where the architecture diagram lives.
Quick conversions
- 1 day = 86,400 s ≈ 10⁵.
- 1 year ≈ 3.15 × 10⁷ s.
- 1 GB = 10⁹ B (decimal) or 2³⁰ ≈ 1.07 × 10⁹ B (binary). Both close enough.
- 1 Gbps ≈ 125 MB/s.
Common ratios
- DAU/MAU: 10-30% (social), 60-80% (essential — banking, email).
- Read:Write: 100:1 (content), 10:1 (cart), 1:1 (chat), 0.1:1 (analytics ingest).
- Avg:Peak: 3-5× for consumer; up to 10× for retail seasonal.
Refs
- Jeff Dean: "Numbers every developer should know" (Google ~2010).
- "Designing Data-Intensive Applications" — capacity throughout.
- Mark Brooker AWS blog (load balancing, capacity, queues).
- "Site Reliability Engineering" — chapters on capacity planning.