All Products
Search
Document Center

Auto Scaling:Instance reclaim modes

Last Updated:Sep 24, 2024

When your business workloads decrease, Auto Scaling triggers scale-in events based on your predefined configurations. The actions performed on instances that are scaled in vary based on your predefined instance reclaim mode. This topic describes how to configure the instance reclaim mode.

Overview of instance reclaim modes

When a scale-in event is triggered, Auto Scaling removes instances from scaling groups based on the values of the Scaling Policy and Scale-In Policy parameters. Instances that are removed from scaling groups are reclaimed based on the value of the Instance Reclaim Mode parameter. The following list describes the values that are supported by the Instance Reclaim Mode parameter:

Important
  • You can configure the Instance Reclaim Mode parameter only if your scaling group is of the ECS type and the network type of your scaling group is VPC.

  • If your scaling group is of the ECI type, the Instance Reclaim Mode parameter is not displayed. By default, elastic container instances are released after they are removed from scaling groups.

  • Set the Instance Reclaim Mode parameter to Release.

    In this mode, instances are released after they are removed from scaling groups, and no resources are retained. In this case, Auto Scaling creates new instances in scaling groups when scale-out events are triggered.

  • Set the Instance Reclaim Mode parameter to Forcibly Release

    In this mode, Auto Scaling forcibly releases ECS instances that are in the Running state when scale-in events are triggered. Forced release is equivalent to power outage. Forced release may cause ephemeral data on instances to be cleared beyond recovery. Proceed with caution when you configure this setting.

  • Set the Instance Reclaim Mode parameter to Economical Mode

    In this mode, instances enter the Stopped state after they are removed from scaling groups, and specific resources are retained for subsequent reuse. This mode ensures cost-effectiveness. In this case, Auto Scaling preferentially adds instances that are in the Stopped state to scaling groups when scale-out events are triggered. If the number of instances in the Stopped state cannot meet the scale-out requirements, Auto Scaling creates the required number of instances and adds the instances to scaling groups. This mode improves scaling efficiency. For more information, see Use the Economical Mode feature to scale instances faster.

  • Set the Instance Reclaim Mode parameter to Forcibly Recycle

    In this mode, Auto Scaling forcibly shuts down instances that are in the Running state when scale-in events are triggered. Forced shutdown is equivalent to power outage. Forced shutdown may cause ephemeral data on instances to be cleared beyond recovery. Proceed with caution when you configure this setting.

Important
  • Data that is stored on instances may be lost when the instances are reclaimed. To prevent data loss, we recommend that you do not store application data or logs on instances.

  • In the following scenarios, instances that are stopped in Economical Mode may be released:

    • If you trigger a scale-in event by manually reducing the value of the Maximum Number of Instances parameter of your scaling group, Auto Scaling preferentially releases instances that are in the Stopped state.

    • If your Alibaba Cloud account has overdue payments or insufficient resources, instances that are in the Stopped state may fail to be added to your scaling group when a scale-out event is triggered. In this case, Auto Scaling may release the failed instances.

  • For more information about the economical mode, see Economical mode.

Configure the instance reclaim mode

Modify the instance reclaim mode for existing scaling groups

To modify the setting of the Instance Reclaim Mode parameter for an existing scaling group, perform the following steps:

  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 whose instance reclaim mode you want to modify and click Details in the Actions column. On the scaling group details page, go to the Instance Scaling Configuration section and click the image icon to open the Edit Instance Scaling Configuration dialog box.

  5. Modify the setting of the Instance Reclaim Mode parameter based on your business requirements.

  6. Click OK.

Configure the instance reclaim mode when you create a scaling group

When you create a scaling group on the Create by Form tab, you can configure the Instance Reclaim Mode parameter based on your business requirements, as shown in the following figure.

image

References