Help Center/ Auto Scaling/ User Guide/ Instance Scaling/ Scaling Instances/ Manually Adding or Removing Instances
Updated on 2026-09-23 GMT+08:00

Manually Adding or Removing Instances

Scenarios

You can manually add or remove instances to or from an AS group, or change the expected number of instances.

Constraints

  • To manually add instances to a specified AS group, the following constraints must be met, as described in Table 1.
    Table 1 Constraints on manually adding instances

    Item

    Constraint

    AS group

    • The AS group must be in the Enabled state.
    • The AS group does not have any ongoing scaling actions.
    • The total number of instances after the addition cannot exceed the maximum number of instances configured for the AS group.

    Instances

    • The instances to be added cannot be members of other AS groups.
    • The instances to be added must be in the same VPC as the AS group.

    Number of instances

    A maximum of 10 instances can be added to an AS group in a single batch.

  • Table 2 describes the constraints on removing instances from an AS group.
    Table 2 Constraints on manually removing instances

    Item

    Constraint

    AS group

    • The AS group must be in the Enabled state.
    • The AS group does not have any ongoing scaling actions.

    Instances

    • Instances can be removed from an AS group only when their lifecycle status is Enabled or Standby.
    • Instances can be removed and deleted only if they were automatically created during scaling actions, their lifecycle status is Enabled or Standby, and they are not being used by SDRS.

    Number of instances

    A maximum of 50 instances can be removed from an AS group in a single batch.

Adding Instances to an AS Group

You can manually add existing instances to an AS group for rapid expansion without waiting for the system to create new instances.

  1. Log in to the AS console.
  2. Click the name of the target AS group. The AS group overview page is displayed. Click the Instances tab.
  3. Click Add.
    Figure 1 Adding instances to an AS group

  4. In the displayed dialog box, select the instance to be added and click OK.

If the AS group has a load balancer, the instances will be associated with the load balancer.

Removing Instances from an AS Group

You can remove instances from an AS group to update or troubleshoot them, and then add them back to the AS group. Once removed, the instances no longer handle any application traffic.

For example, you can change AS configuration for an AS group at any time. New instances will be created using the new configuration, but existing instances in the AS group are not affected. To update existing instances, you can stop them so that they can be replaced automatically. You can also remove the instances from the AS group, update their software, and then add them back to the AS group. To remove instances from an AS group, perform the following steps:

  1. Log in to the AS console.
  2. Click the name of the target AS group. The AS group overview page is displayed. Click the Instances tab.
  3. Remove a single instance or multiple instances in batches.
    • Removing a single instance:

      Locate the row containing the target instance and click Remove or Remove and Delete in the Operation column. In the displayed dialog box, click OK.

      Figure 2 Removing a single instance

    • Batch removing instances:

      Select the instances you want to delete and click Remove or Remove and Delete above the instance list. In the displayed dialog box, click OK.

      Figure 3 Batch removing instances

    • If the instances you want to remove were automatically added to an AS group, they are billed on a pay-per-use basis by default.

      If you click Remove, the system only removes the instances from the AS group.

      If you click Remove and Delete, the system removes the instances from the AS group and deletes them.

    • You can change the billing mode of the instances in an AS group to yearly/monthly.

      In this case, the system only removes the instances from the AS group and does not delete them even if you click Remove and Delete.

    • If instances are manually added to an AS group, they can only be removed and cannot be deleted.
    • If the number of instances after removal is less than the minimum number of instances allowed in an AS group, AS launches new instances to maintain the expected capacity.
    • If you remove instances from an AS group that has a load balancer, the instances will be dissociated from the load balancer.

Changing the Expected Number of Instances

You can manually change the expected number of instances in an AS group to increase or decrease the number of instances in the AS group.

  1. Log in to the AS console.
  2. Change the value of Expected Instances for an AS group.
    You can modify AS group parameters using either of the following methods:
    • Locate the row that contains the target AS group and choose More > Modify AS Group in the Operation column.

    • Click the name of the target AS group. In the upper right corner of the Overview page, click Modify AS Group.

  3. In the displayed dialog box, change the value of Expected Instances.
    Figure 4 Modifying AS group parameters

  4. Click OK.

Helpful Links

If you have manually added ECS instances to an AS group and do not want them to be automatically removed from the AS group, see How Do I Prevent Instances Manually Added to an AS Group from Being Automatically Removed?