A cooldown period refers to a period of lockdown time after a scaling activity is completed in a scaling group. During the cooldown period, the scaling group does not respond to any scaling requests. This topic describes the rules and scenarios of the cooldown period feature. This topic also describes how to configure a cooldown period.
Cooldown period rules
If a scale-out is triggered in a scaling group, the cooldown period of the scaling group starts after the last Elastic Compute Service (ECS) instance or elastic container instance is added to the scaling group. If a scale-in is triggered in a scaling group, the cooldown period of the scaling group starts after the last ECS instance or elastic container instance is removed from the scaling group. For specific cases, see The cooldown period of the scale-out rule is longer than that of the scaling group
NoteIf no scaling activities are triggered in a scaling group, the cooldown period of the scaling group never starts.
If you enable a scaling group that is in the Disabled state, the first scaling activity can bypass the cooldown period of the scaling group and be immediately executed. The cooldown period of a scaling group takes effect only after the first scaling activity is completed in the scaling group that re-enters the Enabled state. For specific cases, see The scale-in rule has no cooldown period.
NoteThe cooldown period of a scaling group affects only the scaling activities in the scaling group.
If you configured a cooldown period for a scaling group, scaling requests that are triggered by event-triggered tasks are rejected in the scaling group. However, other types of scaling requests can bypass the cooldown period. For example, you can manually add or remove instances to or from the scaling group, execute scheduled tasks in the scaling group, change the expected number of instances for the scaling group, and change the minimum and maximum numbers of instances for the scaling group. For specific cases, see The cooldown period of the scale-out rule is equal to that of the scaling group.
Scenarios
The cooldown period of the scale-out rule is longer than that of the scaling group
Scenario | Execution | Result |
| After the add3 rule is executed, three ECS instances are added to the scaling group. | After the third ECS instance is added to the scaling group, the cooldown period of the add3 rule immediately takes effect. In this case, scaling requests that are triggered by event-triggered tasks are rejected in the scaling group for 15 minutes. |
The scale-in rule has no cooldown period
Scenario | Execution | Result |
|
|
|
The cooldown period of the scale-out rule is equal to that of the scaling group
Scenario | Execution | Result |
|
|
|
Configure a cooldown period
You can use one of the following methods to configure a cooldown period:
Configure the Default Cooldown Time (Seconds) parameter when you create a scaling group.
You cannot leave this parameter empty. Unit: seconds. Valid values: 0 to 86400. For more information, see Manage scaling groups.
Configure the Cooldown Time parameter when you create a scaling rule.
If you do not configure the Cooldown Time parameter when you create a scaling rule, the Default Cooldown Time (Seconds) parameter of the scaling group for which the scaling rule is created takes effect. For more information, see Manage scaling rules.
If you configure the Cooldown Time parameter and the Default Cooldown Time (Seconds) parameter at the same time, Auto Scaling preferentially uses the value of the Cooldown Time parameter.