All Products
Search
Document Center

Elastic Compute Service:Improve business availability or reduce communication latency between ECS instances by using deployment sets

Last Updated:Aug 06, 2025

A deployment set is a deployment strategy for placing Elastic Compute Service (ECS) instances on physical servers. For cluster services that require high availability, you can use the high availability or high availability group strategy to deploy ECS instances across different physical servers. This prevents single points of failure (SPOFs) and improves service availability. For applications that are sensitive to network latency, such as high-frequency transactions and real-time data analytics, you can use the low latency strategy to deploy ECS instances on the same underlying hardware. This reduces communication latency between ECS instances. This topic describes the deployment strategies, limits, and usage of deployment sets.

Deployment strategies

A deployment strategy determines how ECS instances are placed on physical servers. You can select a deployment strategy based on your requirements for high availability, network latency, or deployment scale.

Strategy

Description

High availability strategy (Availability)

Deploys ECS instances in a deployment set on different physical servers to effectively reduce the risks of SPOF-induced service interruptions.

  • Scenarios: The systems that are deployed on a small scale and require high service continuity and isolation, such as Hadoop distributed computing clusters and SQL database clusters.

  • Zone: Instances can be deployed in different zones.

  • Number of instances: A maximum of 20 instances can be deployed in a single zone.

High availability group strategy (AvailabilityGroup)

Provides finer-grained control in a single zone. In a single zone, you can assign instances to a maximum of seven different groups to achieve a higher level of fault isolation.

ECS instances in different groups are strictly distributed on different physical servers within the specified region to prevent SPOFs. Multiple ECS instances in the same group are not guaranteed to be distributed and may be deployed on the same physical machine. This reduces the latency of mutual access.

Note

You can call the DescribeInstances operation to query the group (DeploymentSetGroupNo) where an instance is located in a deployment set.

  • Scenarios: Large-scale applications that require high isolation, especially businesses that have built-in high-availability mechanisms, such as primary/secondary replication for Redis and load balancing for Nginx.

  • Zone: Instances can be deployed in different zones.

  • Number of instances: A maximum of 20 instances can be deployed in a single group in a single zone. A maximum of seven groups can be created in a single zone.

Low latency strategy (LowLatency)

All ECS instances are deployed within the same network topology in the same zone. This reduces the latency of network communication.

Important

Multiple instances may be deployed on the same physical server, which cannot guarantee high availability.

  • Scenarios: Applications that are highly sensitive to network response time, especially applications that have built-in high availability mechanisms but have strict requirements for data exchange speeds. Examples include high-performance computing (HPC), real-time data analytics, and AI inference scenarios.

  • Zone: Instances must be deployed in the same zone.

    Number of instances: The number of instances cannot exceed 20.

Limits

Important

If a resource shortage occurs in a specific region, you may be unable to create ECS instances or restart pay-as-you-go ECS instances that were stopped in economical mode. In this case, you can wait and then retry the creation or restart operation. For more information, see Economical mode.

  • Dedicated Hosts cannot be created in a deployment set.

  • Number of deployment sets: The number of deployment sets that a single Alibaba Cloud account can have is limited. For more information, go to the Quota Center.

  • Region and zone: An instance and its deployment set must be in the same region. Instances in a deployment set that uses the low latency strategy must be in the same zone.

  • Supported instance families:

    Different deployment strategies support only specific instance families. For more information, see the following table.

    Note

    You can also call the DescribeDeploymentSetSupportedInstanceTypeFamily operation and specify a deployment strategy to retrieve the supported instance families.

    Deployment strategy

    Supported instance families

    High availability strategy and high availability group strategy

    • g9i, g8a, g8i, g8y, g7se, g7a, g7, g7h, g7t, g7ne, g7nex, g6, g6e, g6a, g5, g5ne, sn2ne, sn2, or sn1

    • c9i, c8a, c8i, c8y, c7se, c7, c7t, c7nex, c7a, c6, c6a, c6e, c5, ic5, or sn1ne

    • r9i, r8a, r8i, r8y, r7, r7se, r7t, r7a, r6, r6e, r6a, re6, re6p, r5, re4, se1ne, or se1

    • hfg9i, hfr9i, hfc9i, hfc8i, hfg8i, hfr8i, hfc7, hfg7, hfr7, hfc6, hfg6, hfr6, hfc5, or hfg5

    • d3s, d3c, d2s, d2c, d1, d1ne, d1-c14d3, or d1-c8d3

    • i4, i4g, i4r, i3g, i3, i2, i2g, i2ne, i2gne, or i1

    • ebmg5, ebmc7, ebmg7, ebmr7, sccgn6, scch5, scch5s, sccg5, or sccg5s

    • e, t6, xn4, mn4, n4, e4, n2, or n1,

    • gn6i

    • u1

    Low latency strategy

    • g9i, g8a, g8i, g8ae, or g8y

    • c9i, c8a, c8i, c8ae, or c8y

    • ebmc8i, ebmg8i, or ebmr8i

    • r9i, r8a, r8i, r8ae, or r8y

    • i4

    • hfg9i, hfr9i, hfc9i, hfc8i, hfg8i, or hfr8i

    • ebmc7, ebmg7, or ebmr7

  • Deployment sets cannot be merged.

Billing

Deployment sets are free of charge. However, you are charged for the resources that you create and use, such as ECS instances, disks, snapshots, images, and public bandwidth. For more information, see Billing overview.

Quick start

Step 1: Create a deployment set

Use the console
  1. Go to ECS console - Deployment Sets.

  2. In the top navigation bar, select the region and resource group of the resource that you want to manage. 地域

  3. On the Deployment Sets page, click Create Deployment Set.

  4. In the Create Deployment Set dialog box, enter a Name and Description, and select a Strategy. For more information about deployment strategies, see the Deployment strategies section in this topic.

Use an API

Call the CreateDeploymentSet operation to create a deployment set in a specified region and set a deployment strategy.

If the deployment strategy is High availability group strategy, you can specify the GroupCount parameter to set the number of groups.

Step 2: Create or add ECS instances in the deployment set

Use the console
Important

The instance type, region, and number of ECS instances must meet the limits. For more information, see Limits.

  • Create a new instance in a deployment set:

    On the deployment sets page, find the deployment set where you want to create an instance. In the Actions column, click Create Instance to open the Custom Launch page and complete the instance configuration.

    image

  • Add an existing instance to a deployment set: For more information, see Change the deployment set to which an instance belongs.

Use an API
  • Create a new instance in a deployment set: Call the RunInstances operation and specify the DeploymentSetId (deployment set ID) parameter.

    If you use the high availability group strategy, you must also set the number of groups.

  • Add an existing instance to a deployment set: Call the ModifyInstanceDeployment operation and specify the InstanceId (instance ID) and DeploymentSetId (deployment set ID) parameters.

    Note

    If the deployment set uses the AvailabilityGroup (high availability group) strategy, you can also specify the DeploymentSetGroupNo parameter to assign the instance to a specific group.

More operations

Change the deployment set to which an instance belongs

You can change the deployment set to which an ECS instance belongs. For example, you can move an instance from one deployment set to another, or add an instance that is not in a deployment set to one that meets your business requirements.

Procedure
Use the console
  1. Go to ECS console - Instance.

  2. In the top navigation bar, select the region and resource group of the resource that you want to manage. 地域

  3. Click the ID of the target instance to open its details page. In the upper-right corner, click All Actions to expand the action panel. Then, search for and click Change Deployment Set.

  4. In the Change Deployment Set dialog box, select the destination deployment set and specify whether to force the instance to move.

    • Yes: Allows the instance to be moved to a different physical server. This operation may cause the instance to restart, which affects service continuity. Proceed with caution.

    • No: Does not move the instance to a different physical server. Instead, this option attempts to add the instance to the specified deployment set. This avoids the risk of an instance restart. However, the change fails if the current instance does not meet the requirements of the new deployment set.

Use an API

Call the ModifyInstanceDeployment operation and specify the following parameters to change the deployment set of an instance:

  • RegionId: Select the region to which the instance belongs. Example: cn-hangzhou, which indicates China (Hangzhou).

  • InstanceId: The instance ID. Example: i-bp67acfmxazb4ph***.

  • DeploymentSetId: The ID of the destination deployment set. Example: ds-bp67acfmxazb4ph****.

  • Force: Specifies whether to force the instance to move to a different physical server when you change its deployment set. Valid values:

    • true: Allows the instance to be moved to a different physical server. This operation may cause the instance to restart, which affects service continuity. Proceed with caution.

    • false (default): Does not move the instance to a different physical server. Instead, this option attempts to add the instance to the specified deployment set. This avoids the risk of an instance restart. However, the change fails if the current instance does not meet the requirements of the new deployment set.

Remove an instance from a deployment set

If you want to delete a deployment set but retain an instance that is in it, you must first remove the instance from the deployment set. After the instance is removed, it remains in its original state.

Important

The target instance must be Running or Stopped. For more information, see Start an instance and Stop an instance.

The following section describes the operations:

  • Call the ModifyInstanceDeployment operation and specify the following parameters to remove an instance from a deployment set:

    • RegionId: Select the region to which the instance belongs. Example: cn-hangzhou, which indicates China (Hangzhou).

    • InstanceId: The instance ID. Example: i-bp67acfmxazb4ph***.

    • DeploymentSetId: The deployment set ID. Example: ds-bp67acfmxazb4ph****.

    • RemoveFromDeploymentSet: Specifies whether to remove the instance from the deployment set. Set this parameter to true.

  • Verify that the instance is removed: If the API operation is successful and returns the status code 200, the instance is removed.

Modify or delete a deployment set

In the ECS console - Deployment Sets, find the target deployment set, click Modify Information or Delete in the Actions column, and then follow the prompts to complete the operation.