All Products
Search
Document Center

Auto Scaling:Cooldown period

Last Updated:Oct 12, 2023

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

    Note

    If 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.

    Note

    The 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

  • The cooldown period of the scaling group is 600 seconds.

  • The cooldown period of the add3 rule of the scaling group is 900 seconds.

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 scaling group is 600 seconds.

  • The remove1 rule has no cooldown period.

  1. Phase 1: After the remove1 rule is executed at 18:00:00, one ECS instance is removed from the scaling group.

  2. Phase 2: The scaling group enters the Disabled state at 18:02:00 and re-enters the Enabled state at 18:05:00.

  1. In Phase 1, scaling requests that are triggered by event-triggered tasks are rejected in the scaling group until 18:10:00.

  2. In Phase 2, if a scaling request is triggered by an event-triggered task between 18:05:00 to 18:10:00, the scaling request is accepted and executed in the scaling group.

    Note

    After the scaling request is completed in the scaling group, scaling requests that are triggered by event-triggered tasks are rejected for 600 seconds.

The cooldown period of the scale-out rule is equal to that of the scaling group

Scenario

Execution

Result

  • The cooldown period of the scaling group is 600 seconds.

  • The cooldown period of the add1 rule of the scaling group is 600 seconds.

  1. Phase 1: After the add1 rule is executed at 18:00:00, one ECS instance is added to the scaling group.

  2. Phase 2: You manually execute the add1 rule at 18:05:00.

  1. In Phase 1, scaling requests that are triggered by event-triggered tasks are rejected in the scaling group until 18:10:00.

  2. In Phase 2, the add1 rule can bypass the cooldown period and be immediately executed to add one ECS instance to the scaling group.

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.

Important

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.