オートスケーリングは、需要に基づいて実行中のリソース(EC2 インスタンスなど)の数を自動的に調整します。負荷が増加すると容量を追加し、負荷が減少すると容量を削除します。信頼性の高い(トラフィック スパイクに対応)かつコスト効率の良い(過剰なプロビジョニングを避ける)アプリケーションを構築するための鍵となります。
オートスケーリングが実行すること
Auto Scaling adjusts capacity AUTOMATICALLY based on demand:
→ load INCREASES (traffic spike) → add instances (scale OUT) → handle the load
→ load DECREASES → remove instances (scale IN) → save money
→ Match capacity to demand automatically: reliable under load, cheap when idle.
EC2 オートスケーリング グループ(ASG)
An AUTO SCALING GROUP manages a fleet of EC2 instances:
MIN / MAX / DESIRED capacity → bounds and target number of instances
LAUNCH TEMPLATE → how to launch new instances (AMI, type, config)
SCALING POLICIES → rules for when to scale (see below)
HEALTH CHECKS → replace unhealthy instances automatically (self-healing!)
→ typically spread across multiple AZs (high availability)
