服务 · 管理与监管
AWS Auto Scaling
Adds and removes capacity automatically, so an application keeps up with demand without paying for idle resources.
本课尚未翻译,暂以英文显示。
- 1The instances report metrics, such as CPU use, to Amazon CloudWatch.
- 2When a metric passes your target, a CloudWatch alarm alerts Auto Scaling.
- 3Auto Scaling launches another instance. When demand drops, it removes the extra ones.
Fixed size
- How it works
- Keeps the desired number of instances and replaces any that fail
- Good when
- You need steady capacity that repairs itself
Scheduled
- How it works
- Changes capacity at dates and times you set
- Good when
- You know when demand changes, such as every weekday morning
Dynamic
- How it works
- Follows a metric, for example keeping average CPU use near 50%
- Good when
- Demand changes and you cannot tell when
Predictive
- How it works
- Forecasts demand from daily and weekly patterns, and adds capacity in advance
- Good when
- Traffic follows a regular cycle
| Way to scale | How it works | Good when |
|---|---|---|
| Fixed size | Keeps the desired number of instances and replaces any that fail | You need steady capacity that repairs itself |
| Scheduled | Changes capacity at dates and times you set | You know when demand changes, such as every weekday morning |
| Dynamic | Follows a metric, for example keeping average CPU use near 50% | Demand changes and you cannot tell when |
| Predictive | Forecasts demand from daily and weekly patterns, and adds capacity in advance | Traffic follows a regular cycle |
1 / 2
Fixed size
- How it works
- Keeps the desired number of instances and replaces any that fail
- Good when
- You need steady capacity that repairs itself
Scheduled
- How it works
- Changes capacity at dates and times you set
- Good when
- You know when demand changes, such as every weekday morning
| Way to scale | How it works | Good when |
|---|---|---|
| Fixed size | Keeps the desired number of instances and replaces any that fail | You need steady capacity that repairs itself |
| Scheduled | Changes capacity at dates and times you set | You know when demand changes, such as every weekday morning |
2 / 2
Dynamic
- How it works
- Follows a metric, for example keeping average CPU use near 50%
- Good when
- Demand changes and you cannot tell when
Predictive
- How it works
- Forecasts demand from daily and weekly patterns, and adds capacity in advance
- Good when
- Traffic follows a regular cycle
| Way to scale | How it works | Good when |
|---|---|---|
| Dynamic | Follows a metric, for example keeping average CPU use near 50% | Demand changes and you cannot tell when |
| Predictive | Forecasts demand from daily and weekly patterns, and adds capacity in advance | Traffic follows a regular cycle |
是什么
AWS Auto Scaling watches your application and adjusts its capacity automatically. When demand rises, it adds resources. When demand falls, it removes them. This is elasticity: enough capacity at busy times, and no paying for idle capacity at quiet times.
For Amazon EC2, instances are grouped into an Auto Scaling group, managed by Amazon EC2 Auto Scaling. You set a minimum, a maximum and a desired number of instances. The group never goes below the minimum or above the maximum, and it replaces instances that fail a health check. Spread across several Availability Zones, the group also keeps your application available if one zone has a problem.
是什么
AWS Auto Scaling can also scale other resources, such as Amazon ECS tasks, Amazon DynamoDB tables and Amazon Aurora replicas. There is no extra charge for it. You pay for the resources it runs and for Amazon CloudWatch monitoring.
要记住
- Auto scaling gives elasticity: capacity grows and shrinks with demand.
- Scale out adds instances. Scale in removes them.
- Minimum, desired and maximum set the size of an Auto Scaling group.
- Failed instances are replaced, so it also helps availability.
要记住
- With a load balancer attached, new instances are registered with it automatically, so they start getting traffic.
考试中
- “Automatically add or remove EC2 instances as demand changes” points to Auto Scaling. The benefit it gives is elasticity.
- “Distribute traffic across instances” points to Elastic Load Balancing, not Auto Scaling. The two are often used together.