Scaling groups are a key component of Auto Scaling. After you configure the instance configuration source for a scaling group and enable the scaling group, Auto Scaling automatically scales ECS instances in the scaling group based on a scaling rule.

Instance configuration sources

Instance configuration sources are classified into scaling configurations and launch templates. Auto Scaling uses the active configuration source in a scaling group to automatically create ECS instances.

Scaling rules

You can use one of the following methods to execute a scaling rule:
  • Manually execute a scaling rule.
  • Execute a scaling rule by using a scheduled task.
  • Execute a scaling rule by using an event-triggered task.

Auto Scaling scales ECS instances in a scaling group based on a scaling rule and the maximum or minimum number of ECS instances specified for the scaling group. Assume that a scaling group can contain up to 45 ECS instances. If you configure a scaling rule to increase the number of ECS instances in the scaling group to 50, Auto Scaling increases the number of ECS instances to 45 at most.

Scaling activities

Scaling activities are triggered when you manually add or delete ECS instances or when a scaling rule is executed. Scaling activities have the following features:
  • An ongoing scaling activity cannot be terminated. For example, if a scaling activity is being executed to create 20 ECS instances but only five have been created, you cannot forcibly terminate the scaling activity.
  • If an ECS instance failed to be added or removed during a scaling activity, Auto Scaling considers that the scaling activity is completed without trying to recreate the failed instance. Auto Scaling rolls back the ECS instance that failed to be added or removed, but not the scaling activity. If Auto Scaling has created 20 ECS instances for a scaling group, 19 instances are added to SLB, only the one ECS instance that failed to be added is automatically released.
  • Auto Scaling uses Resource Access Management (RAM) to call ECS API operations to create ECS instances. ECS instances that are rolled back still incur fees before the instances are released.
Scaling activities have cooldown periods. The cooldown period has the following features:
  • During the cooldown period, Auto Scaling rejects all scaling activities triggered by event-triggered tasks. However, when you manually execute a scaling rule, or a scheduled task starts to be executed at the scheduled time, Auto Scaling can immediately execute a scaling activity without waiting for the cooldown period to expire.
  • The cooldown period starts after the last ECS instance is added to or removed from the scaling group during a scaling activity.