All Products
Search
Document Center

Auto Scaling:Suspend and resume scaling group processes

Last Updated:Sep 24, 2024

When you perform tasks, such as troubleshooting, program debugging, or stress testing, you can temporarily suspend specific scaling group processes to prevent automatic scaling from interfering with these operations. After these tasks are complete, you can resume the suspended scaling group processes of your scaling group. This topic describes how to suspend and resume processes in a scaling group, including the impacts of these operations.

Suspend processes in a scaling group

You can specify an ongoing process that you want to suspend in a scaling group. After you suspend the process, you can perform other operations in the scaling group. For example, when you are debugging a program, you can suspend the scale-out process to prevent the instance on which the program runs from being unexpectedly terminated. Unexpected termination may interfere with your debugging operations.

Before you suspend a process, take note of the following items:

  • Auto Scaling allows you to suspend multiple processes in multiple scaling groups at the same time. The processes in each scaling group may affect each other.

    For example, if you suspend the scale-in process and the health check feature identifies an unhealthy instance in your scaling group, the unhealthy instance cannot be automatically removed from the scaling group.

  • You can implement only process-level control by suspending processes in a scaling group. If you want to implement instance-level control, we recommend that you put your instances into the Standby or Protected state.

    For example, you can put an instance into the Standby state before you troubleshoot issues in the instance or restart the instance. You can also put an instance into the Protected state to prevent instance release. For more information, see Manually change the status of instances and Put an ECS instance into the Protected state.

  • Auto Scaling also allows you to suspend multiple processes in a scaling group at the same time. The following table describes the effects after you suspend different types of processes in a scaling group.

    Process

    Effect

    Scale-out

    Auto Scaling rejects the following scale-out operations in the scaling group:

    • Manually add instances to the scaling group.

    • Rebalance the distribution of instances across multiple zones.

    • Manually execute scale-out rules or automatically execute scale-out rules based on scheduled tasks or event-triggered tasks if the expected number of instances feature is disabled.

    • Automatically execute scale-out rules based on event-triggered tasks if the expected number of instances feature is enabled.

    • If the expected number of instances feature is enabled, Auto Scaling supports manual execution of scale-out rules or automatic execution of scale-out rules based on scheduled tasks. However, the number of instances remains unchanged after a scale-out rule is executed. The expected number of instances feature triggers a scale-out event only after you resume the scale-out process.

    • Automatically create instances based on checks on the minimum number of instances.

    • Automatically create preemptible instances if the supplemental preemptible instance feature is enabled.

    Scale-in

    Auto Scaling rejects the following scale-in operations in the scaling group:

    • Manually remove instances from the scaling group.

    • Rebalance the distribution of instances across multiple zones.

    • Manually execute scale-in rules or automatically execute scale-in rules based on scheduled tasks or event-triggered tasks if the expected number of instances feature is disabled.

    • Automatically execute scale-in rules based on event-triggered tasks if the expected number of instances feature is enabled.

    • If the expected number of instances feature is enabled, Auto Scaling supports manual execution of scale-in rules or automatic execution of scale-in rules based on scheduled tasks. However, the number of instances in the scaling group remains unchanged. The expected number of instances feature triggers a scale-in event only after you resume the scale-in process.

    • Automatically removes instances from the scaling group based on checks on the maximum number of instances.

    Health check

    Auto Scaling stops executing health check tasks and does not remove unhealthy instances from the scaling group.

    Scheduled task

    Auto Scaling does not trigger the execution of the scaling rules specified in scheduled tasks at the specified points in time.

    Event-triggered task

    Auto Scaling does not trigger the execution of scaling rules specified in event-triggered tasks when the event-triggered tasks enter the Alert state.

Resume processes in a scaling group

You can specify a suspended process in a scaling group to resume. Then, the resumed process can work as expected based on its function logic. For example, after you resume the health check process in your scaling group, Auto Scaling automatically removes instances that are considered unhealthy from the scaling group.

Before you resume a scaling process, take note of the following items:

  • After you resume processes in a scaling group, you may need to take note of some changes that occur during the suspension.

    For example, if the expected number of instances is changed during the suspension of a scale-out process, no scale-out operation is complete. After you resume the scale-out process, the expected number of instances feature triggers a scale-out event to increase the number of instances in the scaling group to the expected number of instances.

  • Auto Scaling allows you to resume multiple processes in multiple scaling groups at the same time. The following table describes the effects after you resume different types of processes in a scaling group:

    Process

    Effect

    Scale-out

    Auto Scaling resumes scale-out operations, such as manually adding instances, checking the expected number of instances, and checking the minimum number of instances.

    If the expected number of instances feature is enabled and the expected number of instances increases during the suspension of the scale-out process, the expected number of instances feature triggers a scale-out event to increase the number of instances in the scaling group to the new expected number of instances.

    Scale-in

    Auto Scaling resumes scale-in operations, such as manually removing instances from the scaling group, checking the expected number of instances, and checking the maximum number of instances.

    If the expected number of instances feature is enabled and the expected number of instances decreases during the suspension of a scale-in process, the expected number of instances feature triggers a scale-in event to decrease the number of instances in the scaling group to the new expected number of instances.

    Health check

    Auto Scaling resumes health check processes and removes unhealthy instances from scaling groups.

    Scheduled task

    Auto Scaling triggers the execution of scaling rules specified in scheduled tasks, even before the specified points in time or during the retry interval.

    Event-triggered task

    Auto Scaling triggers the execution of scaling rules specified in event-triggered tasks when the event-triggered tasks enter the Alert state.

Procedure

  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 a region.

  4. On the Scaling Groups page, find the scaling group that you want to manage and click Edit in the Actions column.

  5. In the Edit Scaling Group dialog box, perform the following operations to suspend or resume processes:

    • Suspend processes: Select one or more processes that you want to suspend from the Suspend Process drop-down list.

    • Resume processes: Remove one or more processes that you want to resume from the Suspend Process text box.

  6. Click OK.

    If the scaling strength of your scaling group is weak, a message that prompts you to confirm your operation appears. You can confirm the operation or go back to the Edit Scaling Group dialog box to modify the parameters based on your business requirements.

    Important

    If the scaling strength of your scaling group is weak, the scaling activities in the scaling group may fail. To prevent scaling failures, we recommend that you go back to the Edit Scaling Group dialog box to increase the scaling strength of your scaling group.

    • If you do not want to modify the parameters, click Continue.

    • If you want to modify the parameters, click Back to Modify. After you modify the parameters, click OK.

  7. In the message that appears, click Close.

Verify the result

On the Scaling Groups page, find the scaling group that you modified and click Details in the Actions column. In the Scaling Group Basic Information section of the Basic Information tab, you can view the suspended or resumed processes in the scaling group.

References