Updated on 2024-04-18 GMT+08:00

Managing ECS Groups

Scenarios

An ECS group logically groups ECSs. ECSs in an ECS group comply with the same policy associated with the ECS group.

Currently, only the anti-affinity policy is supported.

This policy enables ECSs in the same ECS group to run on different hosts for improved reliability, high availability, and disaster recovery.

You can perform the following operations on an ECS group:

Constraints

  • ECS groups support the anti-affinity policy only.
  • ECSs are deployed on different physical hosts.
  • If the maximum number of ECS groups is reached, you need to contact customer service to increase the quota.
  • The maximum number of ECSs that can be added to an ECS group varies depending on the region. You can view the quota on the ECS Group page, as shown in Figure 1.
    Figure 1 Maximum number of ECSs that can be added to an ECS group

Creating an ECS Group

Create an ECS group and associate the same policy to all group members. ECS groups are independent from each other.

  1. Log in to the management console.
  2. Click in the upper left corner and select your region and project.
  3. Click . Under Compute, choose Elastic Cloud Server.
  4. In the navigation pane on the left, choose ECS Group.
  5. On the ECS Group page, click Create ECS Group.
  6. Enter the name of an ECS group.
  7. Select a policy for the ECS group.
  8. Click OK.

Adding an ECS to an ECS Group

To improve service reliability, you can add ECSs to an ECS group so that these ECSs in this group can run on different hosts.

  • After an ECS is added to an ECS group, the system reallocates a host to run this ECS to ensure that ECSs in this group are running on different hosts. When the ECS is being restarted, the startup may fail due to insufficient resources. In such a case, remove the ECS from the ECS group and try to restart the ECS again.
  • ECSs that have local disks attached can be added to an ECS group only during the creation process. Once created, they can no longer be added to any ECS groups.
  • Existing ECSs cannot be added to any ECS groups if they have local disks attached (such as disk-intensive, H2, P1, or P2 ECSs), local NVMe SSD disks attached (such as ultra-high I/O ECSs), GPU cards attached (such as G3 ECSs), or FPGA cards attached (such as Fp1 or Fp1c ECSs). They can only be added to an ECS group during the creation process.
  1. Log in to the management console.
  2. Click in the upper left corner and select your region and project.
  3. Click . Under Compute, choose Elastic Cloud Server.
  4. In the navigation pane on the left, choose ECS Group.
  5. Locate the row that contains the target ECS group and click Add ECS in the Operation column.
  6. On the Add ECS page, select an ECS to be added.
  7. (Optional) Stop the ECS.
    Certain types of ECSs need to be stopped before being added to an ECS group. If Stop is displayed in the row containing the selected ECS, you need to stop the ECS first.
    1. Click Stop in the Operation column.
    2. Select a stop option.
      • Stop: The ECS will be stopped normally.
      • Forcibly stop the preceding ECSs: This operation will cause loss of unsaved data. Exercise caution when performing this operation.
    3. Click Yes.
  8. Click OK. The ECS is added to the ECS group.

Removing an ECS from an ECS Group

After an ECS is removed from an ECS group, the ECS does not comply with the anti-affinity policy anymore.

  1. Log in to the management console.
  2. Click in the upper left corner and select your region and project.
  3. Click . Under Compute, choose Elastic Cloud Server.
  4. In the navigation pane on the left, choose ECS Group.
  5. Expand the ECS group information and view the ECSs in the ECS group.
  6. Locate the ECS to be removed and click Remove in the Operation column.
  7. In the displayed dialog box, click Yes.

    The ECS is removed from the ECS group.

Deleting an ECS Group

After an ECS group is deleted, the policy does not apply to the ECSs in the ECS group anymore.

  1. Log in to the management console.
  2. Click in the upper left corner and select your region and project.
  3. Click . Under Compute, choose Elastic Cloud Server.
  4. In the navigation pane on the left, choose ECS Group.
  5. Locate the ECS group to be deleted and click Delete in the Operation column.
  6. In the displayed dialog box, click Yes.