Configures auto scaling for a cluster.
Operation description
Usage notes
Queue-level settings override global settings.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ehpc:SetAutoScaleConfig |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The cluster ID. |
ehpc-hz-FYUr32**** |
| EnableAutoGrow |
boolean |
No |
Specifies whether to enable auto scale-out. Valid values:
Default value: false. |
false |
| EnableAutoShrink |
boolean |
No |
Specifies whether to enable auto scale-in. Valid values:
Default value: false. |
false |
| GrowIntervalInMinutes |
integer |
No |
The interval between two consecutive rounds of scale-out. Unit: minutes. Valid values: 2 to 10. Default value: 2. Note
A gap may occur between rounds within a scale-out task or between consecutive tasks. |
2 |
| ShrinkIntervalInMinutes |
integer |
No |
The interval between two consecutive rounds of scale-in. Unit: minutes. Valid values: 2 to 10. Default value: 2. |
2 |
| ShrinkIdleTimes |
integer |
No |
The number of consecutive idle checks before a compute node is released. Valid values: 2 to 5. Default value: 3. With the default values (ShrinkIdleTimes=3, ShrinkIntervalInMinutes=2), a node idle for more than 6 consecutive minutes is released. |
3 |
| GrowTimeoutInMinutes |
integer |
No |
The scale-out timeout period. Unit: minutes. Valid values: 10 to 60. Default value: 20. Nodes that do not reach the Running state within this period are released. |
20 |
| ExtraNodesGrowRatio |
integer |
No |
The percentage of extra compute nodes. Valid values: 0 to 100. Default value: 0. If you need to add 100 compute nodes and the value of the ExtraNodesGrowRatio parameter is 2, 102 compute nodes are added. |
0 |
| GrowRatio |
integer |
No |
The percentage of each round of a scale-out task. Valid values: 1 to 100. Default value: 100. If you set GrowRatio to 50, the scale-out has two rounds. Each round completes half of the scale-out. |
50 |
| MaxNodesInCluster |
integer |
Yes |
The maximum number of compute nodes that can be added to the cluster. Valid values: 0 to 500. Default value: 100. |
100 |
| ExcludeNodes |
string |
No |
The compute nodes excluded from auto scaling. Separate multiple nodes with commas (,). Specified nodes are retained even when idle. |
i-bp19lgqwxb4206t5****,i-bp1g4hvzs9pywrhb**** |
| SpotStrategy |
string |
No |
The bidding policy for compute nodes. Valid values:
Default value: NoSpot. |
SpotWithPriceLimit |
| SpotPriceLimit |
number |
No |
The maximum hourly price of compute nodes. Accurate to three decimal places. Takes effect only when |
0.062 |
| ImageId |
string |
No |
The IDs of the images. Note
|
centos_7_03_64_20G_alibase_201708**** |
| Queues |
array<object> |
No |
The information about the queue. |
|
|
array<object> |
No |
The array of information about queues. |
||
| QueueImageId |
string |
No |
The image ID of the queue where the scale-out is performed. Valid values of N: 1 to 8. Note
|
centos_7_03_64_20G_alibase_201708**** |
| SystemDiskCategory |
string |
No |
The system disk category for auto-added compute nodes. Valid values:
Valid values of N: 1 to 8. Default value: cloud_efficiency. |
cloud_efficiency |
| InstanceType |
string |
No |
The instance type of auto-added compute nodes. Valid values of N: 1 to 8. |
ecs.n1.medium |
| HostNameSuffix |
string |
No |
The hostname suffix for scale-out nodes in the queue. Valid values of N: 1 to 8. |
000 |
| SpotStrategy |
string |
No |
The bidding policy for auto-added compute nodes. Valid values of N: 1 to 8. Valid values:
Default value: NoSpot. |
NoSpot |
| HostNamePrefix |
string |
No |
The hostname prefix for scale-out nodes in the queue. Valid values of N: 1 to 8. |
compute |
| MinNodesInQueue |
integer |
No |
The minimum number of compute nodes that can be removed from the queue. Valid values: 0 to 50. Valid values of N: 1 to 8. Default value: 0. |
0 |
| SystemDiskSize |
integer |
No |
The system disk size for auto-added compute nodes. Unit: GB. Valid values: 40 to 500. Valid values of N: 1 to 8. Default value: 40. |
40 |
| MaxNodesInQueue |
integer |
No |
The maximum number of compute nodes that can be added to the queue. Valid values: 0 to 500. Valid values of N: 1 to 8. Default value: 100. |
30 |
| EnableAutoShrink |
boolean |
No |
Specifies whether the queue enables auto scale-in. Valid values:
Valid values of N: 1 to 8. Default value: false. |
false |
| QueueName |
string |
No |
The name of the queue. You can specify 1 to 8 names. |
cluster1 |
| EnableAutoGrow |
boolean |
No |
Specifies whether the queue enables auto scale-out. Valid values:
Valid values of N: 1 to 8. Default value: false. |
false |
| SystemDiskLevel |
string |
No |
The system disk performance level for auto-added compute nodes. Valid values:
Valid values of N: 1 to 8. Default value: PL1. |
PL1 |
| SpotPriceLimit |
number |
No |
The maximum hourly price of auto-added compute nodes. Accurate to three decimal places. Takes effect only when Valid values of N: 1 to 8. |
0.662 |
| InstanceTypes |
array<object> |
No |
The instance types of the nodes in the queue. |
|
|
object |
No |
The array of node information. |
||
| VSwitchId |
string |
No |
The vSwitch ID for auto-added compute nodes in the queue. Valid values of N: 0 to 500. |
vsw-bp1lfcjbfb099rrjn**** |
| ZoneId |
string |
No |
The zone ID for auto-added compute nodes in the queue. Valid values of N: 0 to 500. |
cn-hangzhou-b |
| SpotPriceLimit |
number |
No |
The maximum hourly price of auto-added compute nodes. Accurate to three decimal places. Takes effect only when Valid values of N: 0 to 500. |
0.660 |
| InstanceType |
string |
No |
The instance type of auto-added compute nodes in the queue. Valid values of N: 0 to 500. |
ecs.n1.tiny |
| SpotStrategy |
string |
No |
The bidding policy for auto-added compute nodes. Valid values:
Default value: NoSpot. Valid values of N: 0 to 500. |
SpotWithPriceLimit |
| SpotDuration |
integer |
No |
The protection period of the preemptible instance. Unit: hours. Valid values: 0 to 1. A value of 0 means that no protection period is specified. Default value: 1. |
0 |
| SpotInterruptionBehavior |
string |
No |
The interruption mode of the preemptible instance. The value can only be Terminate, which indicates that the instance is released. |
Terminate |
| DataDisks |
array<object> |
No |
The list of data disks. |
|
|
object |
No |
The list of data disks. |
||
| DataDiskSize |
integer |
No |
The size of the data disk. Unit: GB. Valid values: 40 to 500. Default value: 40. Valid values of N: 0 to 16. |
40 |
| DataDiskCategory |
string |
No |
The category of the data disk. Valid values:
Default value: cloud_efficiency. Valid values of N: 0 to 16. |
cloud_efficiency |
| DataDiskDeleteWithInstance |
boolean |
No |
Specifies whether the data disk is released when the node is released. Valid values:
Default value: true. Valid values of N: 0 to 16. |
true |
| DataDiskPerformanceLevel |
string |
No |
The performance level of the ESSD used as the data disk. The parameter takes effect only when the Queues.N.DataDisks.N.DataDiskCategory parameter is set to cloud_essd. Valid values:
Default value: PL1. Valid values of N: 0 to 16. |
PL1 |
| DataDiskEncrypted |
boolean |
No |
Specifies whether to encrypt the data disk. Valid values:
Default value: false. Valid values of N: 0 to 16. |
false |
| DataDiskKMSKeyId |
string |
No |
The Key Management Service (KMS) key ID of the data disk. Valid values of N: 0 to 16. |
0e478b7a-4262-4802-b8cb-00d3fb40826X |
| MaxNodesPerCycle |
integer |
No |
The maximum number of compute nodes that can be added in each round of scale-out. Valid values: 0 to 99. Default value: 0. |
20 |
| MinNodesPerCycle |
integer |
No |
The minimum number of compute nodes added per scale-out round. Valid values: 1 to 99. Default value: 1. If the requested node count is less than this value, the system adjusts automatically to match the request. Note
This setting applies only to the current round. |
5 |
| AutoMinNodesPerCycle |
boolean |
No |
Whether to automatically set the minimum scale-out count to match the job requirement per round. Maximum: 99. |
false |
| SortedByInventory |
boolean |
No |
Whether to sort instance types by inventory during auto scaling. Valid values:
Note
When true, the system selects instance types in descending order of stock availability. |
false |
| ComputeEnableHt |
boolean |
No |
Specifies whether to enable hyper-threading for the ECS instance that is used as the compute node. Note
Hyper-threading is enabled by default and can only be disabled for certain instance types. Specify and view CPU options. |
true |
| DnsConfig |
string |
No |
The DNS configuration in JSON format. |
"{\"DnsType\":\"PrivateZone\",\"DnsName\":\"xxxxx\"}" |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
04F0F334-13358736C-A1D7-6C044FE7**** |
Examples
Success response
JSON format
{
"RequestId": "04F0F334-13358736C-A1D7-6C044FE7****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The specified parameter %s is invalid. | The specified parameter %s is invalid. |
| 500 | UnknownError | An unknown error occurred. | An unknown error occurred. |
| 403 | InvalidOpt | The specified operation is invalid. Please try again later. If the problem still exists, submit a ticket. | |
| 403 | TooManyComputes | The number of computing nodes exceeds the quota. | The number of computing nodes exceeds the quota. |
| 404 | ClusterNotFound | The specified cluster does not exist. | The specified instance does not exist. |
| 404 | ImageNotFound | The specified image does not exist. | The specified image does not exist. Please verify the parameter. |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The request has failed due to a temporary failure of the server. |
| 406 | DbError | A database service error occurred. | Database request failed. |
| 407 | NotAuthorized | You are not authorized by RAM for this request. | The request is not authorized by RAM. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.