Configures auto scaling for a specified E-HPC cluster.
Syntax
{
"Type": "ALIYUN::EHPC::AutoScaleConfig",
"Properties": {
"ExtraNodesGrowRatio": Integer,
"EnableAutoGrow": Boolean,
"ClusterId": String,
"ShrinkIdleTimes": Integer,
"MaxNodesInCluster": Integer,
"EnableAutoShrink": Boolean,
"GrowRatio": Integer,
"GrowIntervalInMinutes": Integer,
"GrowTimeoutInMinutes": Integer,
"ImageId": String,
"ShrinkIntervalInMinutes": Integer,
"SpotPriceLimit": Number,
"Queues": List,
"ExcludeNodes": String,
"SpotStrategy": String
}
}Properties
| Property | Type | Required | Update allowed | Description | Constraints |
| ExtraNodesGrowRatio | Integer | No | Yes | The percentage of extra nodes. | Example: If a job needs 100 nodes and this value is 2, 102 nodes are added. Valid values: 0 to 100. Default value: 0. |
| EnableAutoGrow | Boolean | No | Yes | Enables or disables auto scale-out. | Valid values:
|
| ClusterId | String | Yes | No | The cluster ID. | None |
| ShrinkIdleTimes | Integer | No | Yes | Consecutive idle count before a node is considered for release. A node is idle when not running jobs. | Number of consecutive idle checks before scale-in. Valid values: 2 to 5. Default value: 3. Example: With ShrinkIdleTimes set to 3 and the default ShrinkIntervalInMinutes of 2 minutes, a node is released after being idle for 6+ minutes. |
| MaxNodesInCluster | Integer | No | Yes | Maximum compute nodes allowed in the cluster. | Valid values: 0 to 500. Default value: 100. |
| EnableAutoShrink | Boolean | No | Yes | Enables or disables auto scale-in. | Valid values:
|
| GrowRatio | Integer | No | Yes | The scale-out ratio. | Example: If a job needs 10 nodes and this value is 50, nodes are added at 50% per round. Valid values: 1 to 100. Default value: 100. |
| GrowIntervalInMinutes | Integer | No | Yes | Interval between consecutive scale-out rounds. | Unit: minutes. Valid values: 2 to 10. Default value: 2. Note A scale-out task may span multiple rounds. This parameter controls the interval between rounds. |
| GrowTimeoutInMinutes | Integer | No | Yes | The scale-out timeout period. | Unit: minutes. Valid values: 10 to 60. Default value: 20. Nodes not running after the timeout are released. |
| ImageId | String | No | Yes | The image ID. | Note
|
| ShrinkIntervalInMinutes | Integer | No | Yes | Interval between consecutive scale-in rounds. | Unit: minutes. Valid values: 2 to 10. Default value: 2. |
| SpotPriceLimit | Number | No | Yes | The maximum hourly price for the nodes. | The value can be accurate to three decimal places. This parameter takes effect only when SpotStrategy is set to SpotWithPriceLimit. |
| Queues | List | No | Yes | Queue configurations for scale-out. | Queues properties. |
| ExcludeNodes | String | No | Yes | Nodes excluded from auto scaling. | Separate multiple nodes with commas (,). Note Excluded nodes are never released during scale-in. |
| SpotStrategy | String | No | Yes | The preemption policy for compute nodes. | Valid values:
|
Queues syntax
"Queues": [
{
"HostNameSuffix": String,
"MinNodesInQueue": Integer,
"MaxNodesInQueue": Integer,
"EnableAutoGrow": Boolean,
"DataDisks": List,
"SystemDiskSize": Integer,
"SystemDiskLevel": String,
"QueueImageId": String,
"MinNodesPerCycle": Integer,
"MaxNodesPerCycle": Integer,
"EnableAutoShrink": Boolean,
"SystemDiskCategory": String,
"HostNamePrefix": String,
"SpotPriceLimit": Number,
"InstanceTypes": List,
"InstanceType": String,
"QueueName": String,
"SpotStrategy": String
}
]Queues properties
| Property Name | Type | Required | Update allowed | Description | Constraints |
| HostNameSuffix | String | No | Yes | Hostname suffix for scaled-out nodes. | None |
| MinNodesInQueue | Integer | No | Yes | Minimum node count after scale-in. | Valid values: 0 to 50. Default value: 0. |
| MaxNodesInQueue | Integer | No | Yes | Maximum node count after scale-out. | Valid values: 0 to 500. Default value: 100. |
| EnableAutoGrow | Boolean | No | Yes | Enables or disables queue-level auto scale-out. | Valid values:
|
| DataDisks | List | No | Yes | Data disk configurations. | DataDisks properties. |
| SystemDiskSize | Integer | No | Yes | System disk size for scaled-out nodes. | Unit: GB. Valid values: 40 to 500. Default value: 40. |
| SystemDiskLevel | String | No | Yes | System disk performance level for scaled-out nodes. | Valid values:
|
| QueueImageId | String | No | Yes | Image ID for queue scale-out. | Note
|
| MinNodesPerCycle | Integer | No | Yes | Minimum nodes to add per scale-out round. | Valid values: 1 to 99. Default value: 1. If the required count is less than this minimum, auto scaling adjusts upward to ensure resource delivery.Note This adjustment applies to the current cycle only. |
| MaxNodesPerCycle | Integer | No | Yes | Maximum nodes to add per scale-out round. | Valid values: 0 to 99. Default value: 0. |
| EnableAutoShrink | Boolean | No | Yes | Enables or disables queue-level auto scale-in. | Valid values:
|
| SystemDiskCategory | String | No | Yes | System disk type for scaled-out nodes. | Valid values:
|
| HostNamePrefix | String | No | Yes | Hostname prefix for scaled-out nodes. | None |
| SpotPriceLimit | Number | No | Yes | Maximum hourly price for auto-scaled nodes. | The value can be accurate to three decimal places. This parameter takes effect only when Queues.N.SpotStrategy is set to SpotWithPriceLimit. |
| InstanceTypes | List | No | Yes | Instance type configurations for auto-scaled nodes. | InstanceTypes properties. |
| InstanceType | String | No | Yes | Instance type for auto-scaled nodes in the queue. | None |
| QueueName | String | No | Yes | The name of the queue. | You can set the names of N queues simultaneously. |
| SpotStrategy | String | No | Yes | Preemption policy for auto-scaled nodes in the queue. | Valid values:
|
DataDisks syntax
"DataDisks": [
{
"DataDiskKMSKeyId": String,
"DataDiskPerformanceLevel": String,
"DataDiskEncrypted": Boolean,
"DataDiskDeleteWithInstance": Boolean,
"DataDiskSize": Integer,
"DataDiskCategory": String
}
]DataDisks properties
| Property Name | Type | Required | Update allowed | Description | Constraints |
| DataDiskKMSKeyId | String | No | Yes | KMS key ID for the data disk. | None |
| DataDiskPerformanceLevel | String | No | Yes | Performance level of the data disk (ESSD only). | Valid only when DataDiskCategory is set to cloud_essd. Valid values:
|
| DataDiskEncrypted | Boolean | No | Yes | Specifies whether to encrypt the data disk. | Valid values:
|
| DataDiskDeleteWithInstance | Boolean | No | Yes | Specifies whether to release the data disk with the instance. | Valid values:
|
| DataDiskSize | Integer | No | Yes | Size of the data disk. | Unit: GB. Valid values: 40 to 500. Default value: 40. |
| DataDiskCategory | String | No | Yes | Type of the data disk. | Valid values:
|
InstanceTypes syntax
"InstanceTypes": [
{
"ZoneId": String,
"VSwitchId": String,
"SpotPriceLimit": Number,
"InstanceType": String,
"SpotStrategy": String
}
]InstanceTypes properties
| Property Name | Type | Required | Update allowed | Description | Constraints |
| ZoneId | String | Yes | No | Zone ID for auto-scaled nodes. | Takes effect during queue scale-out. N ranges from 0 to 500. |
| VSwitchId | String | Yes | No | vSwitch ID for auto-scaled nodes. | Takes effect during queue scale-out. N ranges from 0 to 500. |
| SpotPriceLimit | Number | No | Yes | Maximum hourly price for auto-scaled nodes. | The value can be accurate to three decimal places. Valid only when SpotStrategy is set to SpotWithPriceLimit. Takes effect during queue scale-out. N ranges from 0 to 500. |
| InstanceType | String | Yes | Yes | Instance type for auto-scaled nodes. | Takes effect during queue scale-out. N ranges from 0 to 500. |
| SpotStrategy | String | No | Yes | Preemption policy for auto-scaled nodes. | Valid values:
You can configure the bidding strategy for N compute nodes simultaneously. Takes effect during queue scale-out. Up to 500 instance types can be specified. |
Return value
Fn::GetAtt
ClusterId: the cluster ID.
Examples
JSONformat{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "ClusterId": { "Type": "String", "Description": "The cluster ID." }, "Queues": { "Type": "Json", "Description": "", "MaxLength": 8 } }, "Resources": { "AutoScaleConfig": { "Type": "ALIYUN::EHPC::AutoScaleConfig", "Properties": { "ClusterId": { "Ref": "ClusterId" }, "Queues": { "Ref": "Queues" } } } }, "Outputs": { "ClusterId": { "Description": "The cluster ID.", "Value": { "Fn::GetAtt": [ "AutoScaleConfig", "ClusterId" ] } } } }