Auto Scaling automatically removes instances during scale-in events when workloads decrease, following your configured reclaim mode. This topic describes how to configure an instance reclaim mode.
Overview
During a scale-in event, Auto Scaling removes instances from the scaling group according to the Scaling Policy and Scale-In Policy settings. The removed instances are then reclaimed based on the Instance Reclaim Mode setting. The Instance Reclaim Mode parameter supports the following values:
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.
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.
Forcibly Release
In this mode, Auto Scaling forcibly releases ECS instances that are in the
In Service
state when scale-in events are triggered. Forced release is equivalent to a power outage. Forced release may cause ephemeral data on instances to be cleared beyond recovery. Proceed with caution when you configure this setting.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 prioritizes stopped instances for scale-out events. If stopped instances are insufficient, it creates new instances to meet demand. This mode improves scaling efficiency. For more information, see Use the Economical Mode feature to scale instances faster.
Forcibly Recycle
In this mode, Auto Scaling forcibly shuts down instances that are in the
In Service
state when scale-in events are triggered. Forced shutdown is equivalent to a power outage. Forced shutdown may cause ephemeral data on instances to be cleared beyond recovery. Proceed with caution when you configure this setting.
Data on instances is lost upon reclamation. Store application data and logs elsewhere to prevent loss.
Stopped instances in Economical Mode may be released in these scenarios:
When you manually trigger a scale-in event by lowering the Maximum Number of Instances setting, Auto Scaling first releases instances in the Stopped state.
Failed scale-out events may occur if your Alibaba Cloud account has an overdue payment or insufficient resources, preventing instances in the Stopped state from being added to the scaling group. Auto Scaling may then release these 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 Instance Reclaim Mode parameter for an existing scaling group, perform the following steps:
Log on to the Auto Scaling console.
In the left-side navigation pane, click Scaling Groups.
In the top navigation bar, select the region where Auto Scaling is activated.
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
icon to open the Edit Instance Scaling Configuration dialog box.
Modify the setting of the Instance Reclaim Mode parameter based on your business requirements.
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.