ladderlore
ガイドをリクエスト
  • S3 や IAM などのサービス名を入力してください。

サービス · マネジメントとガバナンス

AWS Auto Scaling

Adds and removes capacity automatically, so an application keeps up with demand without paying for idle resources.

このレッスンはまだ翻訳されていないため、英語で表示しています。

Auto Scaling groupEC2EC2EC2CloudWatch
Auto Scaling
  1. 1The instances report metrics, such as CPU use, to Amazon CloudWatch.
  2. 2When a metric passes your target, a CloudWatch alarm alerts Auto Scaling.
  3. 3Auto Scaling launches another instance. When demand drops, it removes the extra ones.
The scaling loop: measure, decide, adjust.
  • 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
Ways an Auto Scaling group changes its size.

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

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
Ways an Auto Scaling group changes its size.

概要

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.