服务 · Management and Governance · 基于 CLF-C02
AWS Auto Scaling
Pick the scaling policy and metric, set warm-up, and know warm pools, lifecycle hooks and launch templates.
本课尚未翻译,暂以英文显示。
你在云从业者中已学过
- An Auto Scaling group has a minimum, a desired and a maximum size.
- It scales out and in, replaces unhealthy instances and spreads across AZs.
- AWS Auto Scaling also scales ECS, DynamoDB and Aurora.
Target tracking
- How it works
- Holds a metric at a target
- Best for
- Most workloads
Step scaling
- How it works
- Bigger alarm, bigger step
- Best for
- Uneven spikes
Simple scaling
- How it works
- One change, then cooldown
- Best for
- Older designs
Scheduled
- How it works
- Acts at set times
- Best for
- Known peaks
Predictive
- How it works
- Forecasts from past load
- Best for
- Repeating cycles
| Policy | How it works | Best for |
|---|---|---|
| Target tracking | Holds a metric at a target | Most workloads |
| Step scaling | Bigger alarm, bigger step | Uneven spikes |
| Simple scaling | One change, then cooldown | Older designs |
| Scheduled | Acts at set times | Known peaks |
| Predictive | Forecasts from past load | Repeating cycles |
1 / 2
Target tracking
- How it works
- Holds a metric at a target
- Best for
- Most workloads
Step scaling
- How it works
- Bigger alarm, bigger step
- Best for
- Uneven spikes
Simple scaling
- How it works
- One change, then cooldown
- Best for
- Older designs
| Policy | How it works | Best for |
|---|---|---|
| Target tracking | Holds a metric at a target | Most workloads |
| Step scaling | Bigger alarm, bigger step | Uneven spikes |
| Simple scaling | One change, then cooldown | Older designs |
2 / 2
Scheduled
- How it works
- Acts at set times
- Best for
- Known peaks
Predictive
- How it works
- Forecasts from past load
- Best for
- Repeating cycles
| Policy | How it works | Best for |
|---|---|---|
| Scheduled | Acts at set times | Known peaks |
| Predictive | Forecasts from past load | Repeating cycles |
- 1The queue backlog is sent to Amazon CloudWatch as a metric.
- 2A target tracking policy compares backlog per instance with the target.
- 3Auto Scaling adds or removes instances.
- 4The instances read messages from the queue.
是什么
A group launches instances from a launch template: the AMI, instance type, security groups and user data, with versions. Scaling policies decide when. Target tracking holds a metric at a target, such as 50% CPU. It is the simplest and the usual choice. Step scaling adds different amounts for different alarm sizes. Simple scaling makes one change, then waits for the cooldown. Scheduled scaling acts at known times. Predictive scaling forecasts load from past patterns and launches ahead of time.
是什么
Choose the metric to match the bottleneck. CPU fits compute-bound work. Request count per target fits web fleets behind a load balancer. For workers that read a queue, scale on backlog per instance: the number of messages in the queue divided by the number of instances. CPU does not show a growing queue.
是什么
Instance warm-up keeps a new instance out of the metric until it is ready. The default cooldown is 300 seconds. The health check grace period gives an instance time to start before it can be replaced. A warm pool holds pre-initialized instances for faster scale out. A lifecycle hook pauses a launch or termination so you can run a step. Instance refresh replaces instances to roll out a new AMI.
要记住
- Target tracking is the default choice: set a target and AWS adds and removes instances.
- Scheduled for known peaks. Predictive for repeating daily or weekly cycles.
- Queue workers: scale on backlog per instance, not on CPU.
- Warm-up and the health check grace period stop early scaling and early replacement.
要记住
- Warm pools cut start time. Lifecycle hooks add steps at launch or termination.
- Instance refresh rolls out a new launch template version.
考试中
- “Keep average CPU near 50%” points to a target tracking policy.
- “Traffic peaks every weekday at 9 AM” points to scheduled or predictive scaling.
- “Workers process an SQS queue” points to scaling on queue backlog per instance.
- “Instances take minutes to initialize” points to a warm pool.
- “Run a script before an instance is terminated” points to a lifecycle hook.
别和这些弄混
Amazon Elastic Compute Cloud (Amazon EC2)Placement groups, network adapters, burstable credits, hibernation and tenancy: EC2 choices that change performance.
Elastic Load BalancingHow an Application Load Balancer decides: listeners, rules, target groups, health checks and the settings the exam asks about.
Amazon Simple Queue Service (Amazon SQS)The settings that decide behavior: visibility timeout, long polling, delay, retention, DLQs, and scaling on queue depth.