Overview
AS policies can trigger scaling actions to adjust bandwidth or the number of instances in an AS group. An AS policy defines what conditions will trigger a scaling action and what action will be triggered. When the trigger conditions are met, a scaling action is performed automatically.
If multiple AS policies are applied to an AS group, a scaling action is triggered as long as any of the AS policies is invoked, provided that the AS policies do not conflict with each other.
The number of instances in an AS group will never exceed the specified maximum and minimum numbers of instances configured.
Constraints
A maximum of 10 AS policies can be created for an AS group.
AS Policy Types
- Alarm policy: AS automatically adjusts the number of ECS instances in an AS group or sets the number of instances to the configured value when an alarm is generated for a configured metric, such as the CPU usage.
- Scheduled policy: AS automatically increases or decreases the number of ECS instances in an AS group or sets the number of instances to the configured value at a specified time.
- Periodic policy: AS automatically increases or decreases the number of ECS instances in an AS group or sets the number of instances to the configured value at a configured interval, such as daily, weekly, and monthly.
Policy Actions
| Policy Action | Description |
|---|---|
| Adding a specified number of instances | This action increases an AS group's expected number of instances by the number you specify. |
| Adding a specified percentage of instances | This action increases an AS group's expected number of instances by a percentage you set. If the product is not an integer, the actual number of instances to be added is rounded off as follows:
|
| Removing a specified number of instances | This action reduces an AS group's expected number of instances by the number you specify. |
| Removing a specified percentage of instances | This action reduces an AS group's expected number of instances by a percentage you set. If the product is not an integer, the actual number of instances to be removed is rounded off as follows:
|
| Setting the expected number of instances to a specified value | This action changes the expected number of instances in an AS group to the value you set. |
| Setting the expected number of instances based on a percentage | This action changes the expected number of instances in an AS group to the product of the number of current instances and a percentage you set. If the product is not an integer, the expected number of instances is rounded off as follows:
|
Scaling Policy Status
| Status | Status in API | Description |
|---|---|---|
| Enabled | INSERVICE | After an AS policy is created, it is enabled by default. An AS policy in this state can be executed. You can enable an AS policy manually. |
| Disabled | PAUSED | An AS policy in this state cannot be executed. You can disable an AS policy manually. |
| Executing | EXECUTING | An AS policy in this state is being executed. You cannot execute an AS policy again until its previous execution is complete. After an execution is complete, the policy status reverts to its state from before the execution. |
Resource Adjustment Modes
- Dynamic
AS adjusts the number of instances or bandwidth when an alarm policy is triggered.
This mode is suitable for scenarios where workloads are unpredictable. Alarm policies are used to trigger scaling actions based on real-time monitoring data (such as CPU usage) to dynamically adjust the number of instances in the AS group.
- Planned
AS adjusts the number of instances or bandwidth when a periodic or scheduled policy is triggered.
This mode is suitable for scenarios where workloads are periodic.
- Manual
You can manually add or remove instances to or from an AS group, or change the expected number of instances.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot