Rebalances the distribution of ECS instances across zones in a multi-zone scaling group.
Operation description
Operation description
The rebalancing operation compensates for imbalanced zones by creating new ECS instances to replace existing ones. New ECS instances are started before existing ones are terminated, so the rebalancing operation does not affect your application performance or availability.
-
This operation is supported only for multi-zone scaling groups whose
MultiAZPolicyis set toBALANCE, and is used to balance the distribution of ECS instances across zones. -
You can perform a rebalancing operation only when the instance distribution in the scaling group is severely imbalanced. A single rebalancing activity can replace up to 20 ECS instances.
-
During a rebalancing activity, if the number of instances in the scaling group approaches or reaches the specified maximum number of ECS instances (MaxSize) but further balancing is required, Auto Scaling allows the number of ECS instances to temporarily exceed MaxSize by 10%. This excess state persists until the instance distribution is balanced, typically for 1 to 6 minutes.
NoteIf 10% of the maximum number of instances is not an integer, the decimal part is rounded up to allow one additional instance. For example, if the maximum number of instances is 15, 10% is 1.5, so a temporary excess of 2 instances is allowed.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:RebalanceInstances |
update |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ScalingGroupId |
string |
Yes |
The ID of the scaling group. |
asg-bp18p2yfxow2dloq**** |
| RegionId |
string |
No |
The region ID of the scaling group. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| ScalingActivityId |
string |
The ID of the scaling activity. |
asa-kjgffgdfadah**** |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
Examples
Success response
JSON format
{
"ScalingActivityId": "asa-kjgffgdfadah****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.