Overview
ECSs managed by an AS group are called scaling instances. Each instance maps to a unique ECS and has attributes assigned by the AS group. The configuration of an ECS instance in an AS group remains unchanged even if the ECS has been modified.
Instance Capabilities
| Capability | Description |
|---|---|
| Manually adding instances | You can manually add instances to an AS group. There are no billing-mode restrictions on manually added instances. |
| Manually removing instances | You can manually remove instances from an AS group. |
| Instance protection | You can enable or disable protection for instances in an AS group. |
| Standby instances | You can put instances into or out of standby. |
Instance Health Check
| Status | Status in API | Description |
|---|---|---|
| Initializing | INITIALIZING | When an instance is being added, its health status is Initializing. |
| Healthy | NORMAL | After an instance is added to an AS group, its health status is Normal by default. |
| Unhealthy | ERROR | This state is automatically set by the health check system when an exception occurs. |
Number of Instances in an AS Group
The number of instances in an AS group can be the expected number of instances, number of current instances, maximum number of instances, and minimum number of instances.
| Type | Description |
|---|---|
| Number of current instances | Actual number of instances in an AS group. This value cannot be changed by manually modifying an AS group parameter or executing an AS policy. |
| Expected number of instances | Desired number of instances in an AS group. If the number of current instances in an AS group is different from the expected number of instances, the AS group starts scaling to reach the expected number. The value can be changed by manually modifying an AS group parameter or executing an AS policy. |
| Maximum number of instances | Maximum value of the expected number of instances. |
| Minimum number of instances | Minimum value of the expected number of instances. |
The expected number of instances is between the minimum and maximum numbers of instances. The expected number of instances can be changed manually or automatically (for example, automatically changed through scheduled, periodic, or alarm-based policies). The following table illustrates examples of changing the expected number of instances.
| Scenario | Example | Result |
|---|---|---|
| Manually changing the expected number of instances | Scale-out: Assume that the number of instances in an AS group is 1 and the expected number of instances is 1. One instance needs to be added during peak hours. Steps:
| The expected number of instances is changed to 2. The AS group starts a scale-out action to add an instance. After the scale-out is complete, the number of instances in the AS group is changed to 2 automatically, which is the same as the expected number of instances. |
| Scale-in: Assume that the number of instances in an AS group is 2 and the expected number of instances is 2. One instance needs to be removed during off-peak hours. Steps:
| The expected number of instances is changed to 1. The AS group starts a scale-in action to remove an instance. After the scale-in is complete, the number of instances in the AS group is changed to 1 automatically, which is the same as the expected number of instances. | |
| Automatically changing the expected number of instances | Scale-out: Assume that the number of instances in an AS group is 1 and the expected number of instances is 1. One instance needs to be added during peak hours. The execution process is as follows:
| The expected number of instances is changed to 2. The AS group starts a scale-out action to add an instance. After the scale-out is complete, the number of instances in the AS group is changed to 2 automatically, which is the same as the expected number of instances. |
| Scale-in: Assume that the number of instances in an AS group is 2 and the expected number of instances is 2. One instance needs to be removed during off-peak hours. The execution process is as follows:
| The expected number of instances is changed to 1. The AS group starts a scale-in action to remove an instance. After the scale-in is complete, the number of instances is changed to 1 automatically, which is the same as the expected number of instances. |
The minimum number of instances specifies the minimum value of the expected number of instances. However, the number of current instances may be less than the value. In this case, the AS group starts a new scale-out action to increase the number of current instances. The following table illustrates an example.
| Scenario | Example | Result |
|---|---|---|
| Instance removal through health check | Assume that the number of instances in an AS group is 1, the expected number of instances is 1, and the minimum number of instances is 1. When an instance in the AS group is stopped, the system performs the following operations:
| The AS health check removes the abnormal instance from the AS group. The AS group creates a new instance to ensure that the number of instances in the AS group is the same as the expected number of instances. |
Instance Lifecycle Status
| Status | Description | Status in API |
|---|---|---|
| Enabled | The instance is running properly and is involved in AS group health check. | INSERVICE |
| Adding | The instance is being added to the AS group, and the instance creation or startup process is in progress. | PENDING |
| Pending addition | The instance is waiting to be added to the AS group. When a lifecycle hook is added to an AS group, the scaling actions that trigger the hook are suspended, and the instances involved are put into a wait state. | PENDING_WAIT |
| Removing | The instance is being removed from the AS group, and the instance removal process is in progress. | REMOVING |
| Pending removal | The instance is waiting to be removed from the AS group. When a lifecycle hook is added to an AS group, the scaling actions that trigger the hook are suspended, and the instances involved are put into a wait state. | REMOVING_WAIT |
| Standby | The instance has been put into the standby state. Putting an instance into the standby state allows you to perform operations such as stopping or restarting an instance without removing it from the AS group. | STANDBY |
| Entering standby mode | The instance is entering the standby state, switching from Enabled to Standby. | ENTERING_STANDBY |
The following figure shows the lifecycle status changes of an instance during a scaling action.

If you use a lifecycle hook, the lifecycle status changes are as follows.

What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot