Instance Lifecycle

An ECS instance in an AS group goes through different statuses from its creation to its removal.

The instance status changes as shown in Figure 1.

**Figure 1** Instance lifecycle

Figure 1 Instance lifecycle

When trigger condition 2 or 4 is met, the system autonomously puts instances into the next status.

Table 1 Instance statuses

Status

Sub-status

Status Description

Trigger Condition

Initial

None

The instance has not been added to the AS group.

The instance status changes to Adding to AS group when any of the following conditions occurs:

  • You manually increase the expected number of instances of the AS group.

  • The system automatically expands the AS group capacity.

  • You manually add instances to the AS group.

Adding to AS group

Add the instance.

When trigger condition 1 is met, AS adds the instance to expand the AS group capacity.

(Optional) Associate the instance with a load balancing listener.

When trigger condition 1 is met, AS associates the created instance with the load balancing listener.

Enabled

None

The instance is added to the AS group and starts to process service traffic.

The instance status changes from Enabled to Removing from AS group when any of the following conditions is met:

  • You manually decrease the expected number of instances of the AS group.

  • The system automatically reduces the AS group capacity.

  • A health check shows that an enabled instance is unhealthy, and the system removes it from the AS group.

  • You manually remove instances from the AS group.

Removing from AS group

(Optional) Disassociate the instance from the load balancing listener.

When trigger condition 3 is met, the AS group starts to reduce resources and disassociate the instance from the load balancing listener.

Remove the instance.

After the instance is unbound from the load balancing listener, it is removed from the AS group.

Removed

None

The instance lifecycle in the AS group ends.

None

When an ECS instance is added to an AS group manually or through a scaling action, it goes through the Adding to AS group, Enabled, and Removing from AS group statuses. Then it is finally removed from the AS group.