Cooldown period

更新时间:
复制 MD 格式

A cooldown period is a configurable delay after a scaling activity triggered by an event-triggered task completes. During this time, the scaling group rejects new scaling requests from these tasks. This helps control scaling frequency and allows your system to stabilize.

How it works

A cooldown period defines the minimum time interval between two scaling activities initiated by event-triggered tasks. Auto Scaling rejects any new scaling requests from these tasks during this period.

Important

If a Cooldown Time is configured, the scaling group rejects scaling requests from Event-triggered Tasks. However, scaling activities initiated by other methods are unaffected and can execute immediately. These methods include manual execution, scheduled tasks, and changes to the Event-triggered Tasks, maximum size, or minimum size. This also applies to API calls that perform these actions.

  • Types of cooldown periods

    • Default cooldown time: The default cooldown time for an entire scaling group.

    • Cooldown period: The cooldown period for a specific simple scaling rule. If this is not configured for a rule, the rule inherits the scaling group's Default Cool-down Time.

  • Scope

    Cooldown periods apply only to scaling activities triggered by event-triggered tasks (CloudMonitor).

  • Calculation rules

    • Start time: The cooldown timer starts after a scaling activity completes, specifically when the last ECS instance is successfully added to or removed from the scaling group. If a scaling activity finishes without changing the number of ECS instances, the cooldown period does not begin.

    • Precedence: If both a group-level default cooldown time and a rule-specific cooldown period are configured, the rule-specific cooldown period takes precedence.

    Important
    • If you disable and then re-enable a scaling group, any active cooldown from a previous scaling activity is reset. The next scaling activity triggered by an event ignores the previous cooldown.

Examples

Scenario

Process

Result

  • A scaling group's Default Cool-down Time is set to 600 seconds (10 minutes).

  • A scale-out rule in the group, add3, has its Cooldown Time set to 900 seconds (15 minutes).

A scale-out activity based on the add3 rule completes, adding three ECS instances to the scaling group.

After the third ECS instance is added, a 15-minute cooldown period begins. During this time, the scaling group rejects scaling requests from event-triggered tasks.

  • A scaling group's Default Cool-down Time is set to 600 seconds (10 minutes).

  • A scale-in rule in the group, remove1, does not have a specific Cooldown Time configured.

  1. Step 1: At 18:00, a scale-in activity based on the remove1 rule completes, removing one ECS instance.

  2. Step 2: At 18:02, the scaling group is disabled. It is then re-enabled at 18:05.

  1. In Step 1, the group enters its default 10-minute cooldown. It rejects new event-triggered scaling requests until 18:10.

  2. In Step 2, re-enabling the group resets the cooldown. If an event-triggered task sends a scaling request between 18:05 and 18:10, the group accepts and executes it immediately.

    Note

    After this new scaling activity completes, the group enters a new 600-second cooldown period and rejects subsequent event-triggered requests.

  • A scaling group's Default Cool-down Time is set to 600 seconds (10 minutes).

  • A scale-out rule in the group, add1, has its Cooldown Time set to 600 seconds (10 minutes).

  1. Step 1: At 18:00, a scale-out activity based on the add1 rule completes, adding one ECS instance.

  2. Step 2: At 18:05, the add1 scale-out rule is executed manually.

  1. In Step 1, the group enters a 10-minute cooldown and rejects event-triggered scaling requests until 18:10.

  2. In Step 2, the manual execution bypasses the active cooldown. The group immediately accepts and executes the request, adding one more ECS instance.

Configure a cooldown period

Set the default cooldownDefault Cool-down Time

Modify an existing group

  1. Log on to the Auto Scaling console.

  2. In the left-side navigation pane, click Scaling Groups.

  3. In the top navigation bar, select the region where Auto Scaling is activated.

  4. On the Scaling Groups page, find the scaling group for which you want to modify the Default Cool-down Time, and in the Actions column on the right, click Modify.

  5. Update the value for Default Cooldown Time (Seconds).

  6. Click OK.

Create a new group

When you create a scaling group, you can set the Default Cooldown Time (Seconds) on the creation page.

In this example, Default Cooldown Time (Seconds) is set to 300. The value must be an integer from 0 to 86,400.

To create a scaling group, see Create an ECS scaling group or Create an ECI scaling group.

Set the cooldown periodCooldown Time

Modify an existing rule

  1. Log on to the Auto Scaling console.

  2. In the left-side navigation pane, click Scaling Groups.

  3. In the top navigation bar, select the region where Auto Scaling is activated.

  4. On the Scaling Groups page, find the scaling group for which you want to modify the Cooldown Time of a scaling rule, and in the Actions column on the right, click Details to go to the details page of the scaling group.

  5. Click the Scaling Rules and Tasks tab. In the Scaling Rules list, find the simple scaling rule to modify. In the Actions column, click Modify to open the Edit Scaling Rule dialog box.

  6. Update the value for Cooldown Time.

  7. Click OK.

Create a new rule

When you create a simple scaling rule, you can set a Cooldown Time for the rule.

The default value is 300 seconds.

To create a scaling rule, see Configure scaling rules.

API reference