AWS Auto Scaling
- What it is
- Automatically adds and removes capacity to match demand — the mechanism that delivers Elasticity.
- Two things share the name
- EC2 Auto Scaling — manages a group (ASG) of EC2 instances with a minimum, desired, and maximum count. Also replaces unhealthy instances automatically.
- AWS Auto Scaling — a unified plane that scales EC2, ECS, DynamoDB, Aurora replicas, and Spot Fleets from one place, based on a target utilization.
- Scaling policy types
- Target tracking — “keep average CPU at 50%”. The simplest and most common.
- Step scaling — add N instances per alarm threshold breached.
- Scheduled scaling — scale up every weekday at 8am for known patterns.
- Predictive scaling — machine learning forecasts load and scales ahead of it.
- Two directions
- Horizontal scaling (scaling out) — more instances. What Auto Scaling does.
- Vertical scaling (scaling up) — a bigger instance. Requires a stop/start, not automated by ASGs.
- Pairs with
- load balancers — the ASG registers new instances with the load balancer so traffic reaches them.