Scaling policy priority: If you do not manually adjust the number of pods, auto scaling policies will take effect for resource scheduling. If manual scaling is triggered, auto scaling policies will be temporarily invalid.
HPA policies can be used for auto scaling. You can view all policies or perform more operations in Auto Scaling.
You can define auto scaling policies as required, which can intelligently adjust resources in response to service changes and data traffic spikes.
Auto scaling can be backed by Application Operations Management (AOM), but not for clusters of v1.17 and later.
Currently, CCE supports the following types of auto scaling policies:
Metric-based policy: After a workload is created, pods will be automatically scaled when the workload's CPU or memory usage exceeds or falls below a preset limit.
Scheduled policy: scaling at a specified time. Scheduled auto scaling is applicable flash sales, premier shopping events, and other regular events that bring a high burst of traffic load.
Periodic policy: scaling at a specified time on a daily, weekly, or monthly basis. Periodic scheduling is applicable to scenarios where traffic changes periodically.
Parameter |
Description |
---|---|
Policy Name |
Enter the name of the scaling policy. The policy name must be 1 to 64 characters in length and start with a letter. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
Policy Type |
Set this parameter to Metric-based policy. The alarm policy is triggered based on historical data. The system checks whether the indicators set by the user in the monitoring window meet the triggering conditions every minute. If the triggering conditions are met for N consecutive periods, the system performs the action specified by the policy. |
Metric |
Set the metrics that describe the resource performance data or status.
|
Trigger Condition |
The value can be higher (>) or lower (<) than a threshold. When the usage of the preceding metrics reaches the specified value, the scaling policy is triggered. For example, if Metric is set to CPU Usage and this parameter is set to > 70%, the scaling policy is triggered when the CPU usage exceeds 70%. |
Monitoring window |
Size of the data aggregation window. If the value is set to 60, metric statistics are collected every 60 seconds. |
Threshold Crossings |
Number of consecutive times that the threshold is reached within the monitoring window. The calculation cycle is fixed at one minute. If the parameter is set to 3, the action is triggered if threshold is reached for three consecutive measurement periods. |
Action |
Action executed after a policy is triggered. Two actions are available: add or reduce pods. |
When the trigger condition is met, the auto scaling policy starts automatically.
Parameter |
Description |
---|---|
Policy Name |
Enter the name of the scaling policy. The policy name must be 1 to 64 characters in length and start with a letter. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
Policy Type |
Set this parameter to Scheduled policy. |
Trigger Time |
Time at which the policy is enforced. |
Action |
Action executed after a policy is triggered. Three actions are available: add pods, reduce pods, and set the number of pods. |
When the trigger time is reached, you can see on the Pods tab page that the auto scaling policy has taken effect.
Parameter |
Description |
---|---|
Policy Name |
Enter the name of the scaling policy. The policy name must be 1 to 64 characters in length and start with a letter. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
Policy Type |
Set this parameter to Periodic policy. |
Time Range |
Specify the time for triggering the policy. |
Action |
Action executed after a policy is triggered. Three actions are available: add pods, reduce pods, and set the number of pods. |
When the trigger condition is met, the auto scaling policy starts automatically.