All Products
Search
Document Center

Elastic Compute Service:Use deployment sets to improve service availability or reduce communication latency between ECS instances

Last Updated:Sep 12, 2024

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

Deployment strategies

A deployment strategy determines how to deploy ECS instances on physical servers. You can select a deployment strategy based on your business requirements, such as high availability, network latency, and 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.

  • Suitable 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 scope: ECS instances in a deployment set can be deployed in different zones.

  • Maximum number of instances: Up to 20 ECS instances can be deployed per zone.

High availability group strategy (AvailabilityGroup)

Provides finer-grained control in a single zone by dividing a deployment set into up to seven deployment set groups and allocating ECS instances to the groups to achieve higher fault isolation.

ECS instances allocated to the deployment set groups are strictly distributed on different physical servers within a specific region to prevent SPOFs. In addition, multiple ECS instances in the same deployment set group may be deployed on the same physical server. This reduces the latency of mutual access.

Note

To query the deployment set groups (DeploymentSetGroupNo) to which ECS instances are allocated in a deployment set, call the DescribeInstances operation.

  • Suitable scenarios: Large-scale applications that require high isolation, especially applications that have built-in high availability mechanisms, such as master-replica replication mechanism of ApsaraDB for Redis and NGINX load balancing mechanism.

  • Zone scope: ECS instances in a deployment set can be deployed in different zones.

  • Maximum number of instances: Up to 20 ECS instances can be deployed per deployment set group per zone. Up to seven deployment groups are supported per zone.

Low latency strategy (LowLatency)

Deploys all ECS instances within the same network in the same zone, which reduces communication latency.

Important

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

  • Suitable scenarios: Applications that are highly sensitive to network response speeds, especially applications that have built-in high availability mechanisms and require rapid data exchanges, such as high-performance computing, real-time data analytics, and AI inference.

  • Zone scope: ECS instances of a deployment set must reside in the same zone.

    Maximum number of instances: Up to 20 ECS instances can be deployed in a zone.

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 instances that were stopped in economical mode in the region. In this case, wait a period of time and try again. For more information, see Economical mode.

  • Dedicated hosts: cannot be created in deployment sets.

  • Maximum number of deployment sets: To query the quota of deployment sets that an Alibaba Cloud account can create, go to the General Quotas page of ECS in the Quota Center console.

  • Region and zone limits: ECS instances and the deployment sets to which the instances belong must be in the same region. ECS instances in a deployment set that uses the low latency strategy must be deployed in the same zone.

  • Instance family limits

    Deployment strategies that can be used may vary based on the instance family. The following table describes the deployment strategies that are supported by different instance families.

    Note

    To query the instance families that support a specific deployment strategy, call the DescribeDeploymentSetSupportedInstanceTypeFamily operation.

    Deployment strategy

    Instance families that support the deployment strategy

    High availability strategy or high availability group strategy

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

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

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

    • hfc8i, hfg8i, hfr8i, hfc7, hfg7, hfr7, hfc6, hfg6, hfr6, hfc5, and hfg5

    • d3c, d2s, d2c, d1, d1ne, d1-c14d3, and d1-c8d3

    • i3g, i3, i2, i2g, i2ne, i2gne, and i1

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

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

    • gn6i

    Low latency strategy

    • g8a, g8i, g8ae, and g8y

    • c8a, c8i, c8ae, and c8y

    • ebmc8i, ebmg8i, and ebmr8i

    • r8a, r8i, r8ae, and r8y

    • ebmc7, ebmg7, and ebmr7

  • Deployment sets cannot be merged.

Billing

You can use deployment sets free of charge. However, you are charged for the creation and usage of resources, such as ECS instances, disks, snapshots, images, and public bandwidth, in deployment sets. For more information, see Billing overview.

Quick start

Step 1: Create a deployment set

Use the ECS console
  1. In the ECS console, choose Deployment & Elasticity > icon1 > Deployment Sets to go to the Deployment Sets page.

  2. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  3. In the Create Deployment Set dialog box, configure the Deployment Set Name, Description, and Strategy parameters. For information about how to select a deployment strategy, see the Deployment strategies section of this topic.

Call API operations

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

If the Strategy parameter is set to AvailabilityGroup, you can configure the GroupCount parameter to specify the number of deployment set groups.

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

Use the ECS console
Important

Make sure that the instance types, regions, and quantity of ECS instances meet the limits. For more information, see the Limits section of this topic.

  • Create an ECS instance in a deployment set.

    On the Deployment Sets page, find the deployment set in which you want to create an ECS instance and click Create Instance in the Actions column to go to the ECS instance buy page.

    image

  • Add an existing ECS instance to a deployment set. For more information, see the Change the deployment set to which an ECS instance belongs section of this topic.

Call API operations
  • To create an ECS instance in a deployment set, call the RunInstances operation and specify the DeploymentSetId parameter.

    Specify the number of deployment set groups in the deployment set.

  • To add an existing ECS instance to a deployment set, call the ModifyInstanceDeployment operation and specify the InstanceId and DeploymentSetId parameters.

    Note

    If you set the Strategy parameter to AvailabilityGroup, you can configure the DeploymentSetGroupNo parameter to specify the number of the deployment set group to which to deploy the ECS instance.

More operations

Change the deployment set to which an ECS instance belongs

You can move an ECS instance from an existing deployment set to a different deployment set or add an ECS instance that does not belong to a deployment set to a deployment set based on your business requirements.

Procedure
Use the ECS console
  1. Go to the Instance page in the ECS console.

  2. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  3. Find an ECS instance that you want to manage and choose 1 > Deployment & Elasticity > Change Deployment Set in the Actions column.

  4. In the Change Deployment Set dialog box, select the destination deployment set and configure the Force Change parameter.

    • Yes: allows the instance to be moved to a different physical server. A forced change may cause the instance to restart. Proceed with caution.

    • No: adds the instance to the destination deployment set and does not allow the instance to be moved to a different physical server. This prevents an instance restart. If the current instance does not meet the requirements of the destination deployment set, the instance cannot be added to the destination deployment set.

Call API operations

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

  • RegionId: The ID of the region to which the instance belongs. Example: cn-hangzhou.

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

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

  • Force: specifies whether to forcefully move the instance to a different physical server. Valid values:

    • true: allows the instance to be moved to a different physical server. A forced change may cause the instance to restart. Proceed with caution.

    • false (default): adds the instance to a specific deployment set and does not allow the instance to be moved to a different physical server. This prevents an instance restart. If the current instance does not meet the requirements of the destination deployment set, the instance cannot be added to the destination deployment set.

Remove an ECS instance from a deployment set

To retain an ECS instance in a deployment set that you want to delete, you can remove the instance from the deployment set and then delete the deployment set. This allows the instance to remain in the original state.

Important

Make sure that the instance whose deployment set you want to delete is in the Running or Stopped state. For more information, see Start an instance and Stop an instance.

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

    • RegionId: The ID of the region to which the instance belongs. Example: cn-hangzhou.

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

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

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

  • Check whether the instance is removed as expected. If the operation is called as expected and the status code 200 is returned, the instance is removed as expected.

Modify or delete a deployment set

On the Deployment Sets page, find the deployment set that you want to manage and click Modify Information or Delete in the Actions column.

  • Modify the deployment set by changing the name or description of the deployment set.

  • Delete the deployment set. If you no longer require a deployment set, delete the deployment set to prevent unnecessary resource usage.

    Important

    When you delete a deployment set, make sure that no instances exist in the deployment set. If an instance exists, remove the instance before you delete the deployment set. For more information, see the Change the deployment set to which an ECS instance belongs or Remove an ECS instance from a deployment set section of this topic.