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.
|
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 (
|
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.
|
Limits
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.
NoteYou 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
In the top navigation bar, select the region and resource group of the resource that you want to manage.
On the Deployment Sets page, click Create Deployment Set.
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
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.
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) andDeploymentSetId
(deployment set ID) parameters.NoteIf the deployment set uses the
AvailabilityGroup
(high availability group) strategy, you can also specify theDeploymentSetGroupNo
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
Go to ECS console - Instance.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
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
.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.
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.
Modify a deployment set: You can modify the name and description of the deployment set.
Delete a deployment set: If you no longer need a deployment set, you can delete it.
ImportantBefore you delete a deployment set, make sure that it contains no instances. If the deployment set contains instances, you must first remove them. For more information, see Change the deployment set to which an instance belongs or Remove an instance from a deployment set.