Overview

更新时间:
复制 MD 格式

This page covers the operations available for managing Elastic Compute Service (ECS) instances and elastic container instances in Auto Scaling groups — including manual management, instance state changes, rebalancing, and integration with Server Load Balancer (SLB) and ApsaraDB RDS.

Instance management operations

Auto Scaling supports the following operations on instances in a scaling group.

OperationDescriptionUser guideAPI reference
Check health statusCheck the health status of instances in a scaling group.Instance lifecyclesSetInstanceHealth
Add instancesManually add ECS instances or elastic container instances to a scaling group.Manually configure instances for a scaling groupAttachInstances
Query instance listList all instances in a scaling group.DescribeScalingInstances
Remove instancesRemove or delete instances from a scaling group.DetachInstances, RemoveInstances
Put instances into Standby stateTemporarily remove instances from active service for maintenance. Return them to service when ready.Manually change the status of instancesEnterStandby, ExitStandby
Put instances into Protected statePrevent specific instances from being removed during scale-in events. Use this to protect instances running critical workloads that must not be terminated automatically.SetInstancesProtection
Put instances into Stopped stateStop instances while keeping them in the scaling group.N/A
Rebalance instance distributionEvenly redistribute ECS instances across zones in a scaling group.Rebalance the distribution of ECS instancesRebalanceInstances
Associate with SLB instancesAttach or detach instances from one or more SLB instances.Associate SLB instances with or disassociate SLB instances from a scaling groupAttachLoadBalancers, DetachLoadBalancers
Associate with ApsaraDB RDS instancesAttach or detach instances from one or more ApsaraDB RDS instances.Associate ApsaraDB RDS instances with a scaling group or disassociate ApsaraDB RDS instances from a scaling groupAttachDBInstances, DetachDBInstances

Failure scenarios

Auto Scaling lets you delete instances that it automatically created — even from another service's console. For example, deleting an ECS instance from the ECS console also removes it from the scaling group in Auto Scaling. This can interrupt the services those instances were running.

The tables below describe what happens in each scenario and how Auto Scaling responds.

Forcibly deleted instances or resources

ResourceWhat you didAuto Scaling response
ECS instances or elastic container instancesDeleted instances from the ECS console or Elastic Container Instance console, or via API operationsIf health check is enabled, Auto Scaling detects unhealthy instances and removes them. If the remaining instance count drops below the minimum, Auto Scaling creates new ECS instances or elastic container instances to restore the minimum.
Note

The private IP addresses of unhealthy ECS instances or elastic container instances are not automatically deleted from the IP address whitelists of associated ApsaraDB RDS instances.

SLB instancesForcibly detached ECS or elastic container instances from an SLB instance in the SLB console or via API operationsAuto Scaling does not detect the detachment and does not handle the exception. The instances remain in the scaling group. On the next scale-in event, Auto Scaling releases the instances if they meet the removal policy criteria.
SLB instancesDeleted the associated SLB instance or disabled its health check in the SLB console or via API operationsThe instances in the scaling group are no longer attached to the deleted SLB instance. Scale-in events can still remove instances from the scaling group. Unhealthy instances are removed automatically.
ApsaraDB RDSRemoved instance private IP addresses from the ApsaraDB RDS IP address whitelist in the RDS console or via API operationsAuto Scaling does not detect the change. The instances remain in the scaling group. On the next scale-in event, Auto Scaling releases the instances if they meet the removal policy criteria.
ApsaraDB RDSDeleted the associated ApsaraDB RDS instance in the RDS console or via API operationsPrivate IP addresses of scaling group instances are no longer added to the deleted RDS instance's whitelist. Scale-in events can still remove instances. Unhealthy instances are removed automatically.

Revoked API permissions

ResourceWhat you didAuto Scaling response
ECS instances or elastic container instancesRevoked Auto Scaling's permissions on ECS API or Elastic Container Instance APIAuto Scaling rejects all scaling requests.
SLB instancesRevoked Auto Scaling's permissions on SLB APIAuto Scaling rejects all scaling activities in scaling groups associated with SLB instances.
ApsaraDB RDSRevoked Auto Scaling's permissions on ApsaraDB RDS APIAuto Scaling rejects all scaling requests in scaling groups associated with ApsaraDB RDS instances.

Unavailable resources

ResourceCauseAuto Scaling response
SLB instancesSLB instances became unavailable due to reasons such as overdue payments or system failuresOnly manual removal of instances from the scaling group is possible. No other scaling activities can be triggered.
ApsaraDB RDSApsaraDB RDS instances became unavailable due to reasons such as overdue payments or system failuresOnly manual removal of instances from the scaling group is possible. No other scaling activities can be triggered.