見積もりとキャパシティプランニング — 予想される負荷、データ量、リソース需要を計算すること — はシステム設計の重要な部分です。ラフな「ざっくりした計算」(back-of-the-envelope calculations)は設計の決定(どの程度スケールするか、どのようなリソースが必要か)を導くものであり、設計インタビューでは一般的です。
なぜ重要なのか
Estimating scale informs DESIGN decisions:
→ how many servers? how much storage? what database? do you need sharding/caching?
→ understanding the SCALE (small vs massive) shapes the whole design
→ rough numbers guide whether/how to scale (don't over- or under-engineer)
見積もる対象(ざっくりした計算)
✓ TRAFFIC → users, requests/sec (QPS); read vs write ratio (e.g. 100:1 reads:writes)
→ peak vs average (design for peak); daily active users → requests
✓ STORAGE → data size per item × volume × growth over time → total storage (and growth rate)
✓ BANDWIDTH → data transferred per second (request size × QPS)
✓ MEMORY → cache size needed (e.g. cache the hot 20% of data)
→ rough estimates (order of magnitude) → good enough to inform design
