The purpose of a scaling rule varies based on its type. A scaling rule can be used to trigger a scaling activity or set the minimum and maximum numbers of instances for a scaling group. This topic describes how to create, execute, modify, and delete scaling rules.
Background information
- You can create four types of scaling rules in Auto Scaling.
- You can create only a limited number of scaling rules for a scaling group. To view the quota of scaling rules that you can create, visit Quota Center.
- You can create simple scaling rules, step scaling rules, target tracking scaling rules, and predictive scaling rules for scaling groups that contain Elastic Compute Service (ECS) instances. You can create only simple scaling rules and target tracking scaling rules for scaling groups that contain elastic container instances.
Create a scaling rule
Execute a scaling rule
You can execute a scaling rule to manually or automatically scale ECS instances or elastic container instances. You must manually execute simple scaling rules and step scaling rules. You can configure Auto Scaling to execute target tracking scaling rules and predictive scaling rules. Before you execute a scaling rule, make sure that the following requirements are met:
- You have no overdue payments within your Alibaba Cloud account. If you have overdue payments, all scaling activities fail. If you want Auto Scaling to provide services as expected, make sure that you have sufficient balance within your Alibaba Cloud account.
- The scaling group to which the scaling rule that you want to execute belongs must be in the Enabled state.
- If you do not specify an expected number of instances for the scaling group to which the scaling rule that you want to execute belongs, no scaling activities can be executed in the scaling group. If you specify an expected number of instances for the scaling group to which the scaling rule that you want to execute belongs, no non-parallel scaling activities can be executed in the scaling group. For more information, see Expected number of instances.
Manually execute a scaling rule
If you temporarily need ECS instances or elastic container instances, you can manually execute a scaling rule. If no scaling activities are in progress in the scaling group, you can ignore the specified cooldown time and immediately execute the scaling rule. Within the specified cooldown time, Auto Scaling rejects scaling requests initiated by event-triggered tasks that are monitored by CloudMonitor.
- Log on to the Auto Scaling console.
- In the left-side navigation pane, click Scaling Groups.
- In the top navigation bar, select a region.
- Find the scaling group for which you want to execute a scaling rule and click Details in the Actions column.
- In the upper part of the page, click the Scaling Rules and Activities tab, and then click the Scaling Rules tab.
- Find the scaling rule that you want to execute and click Execute in the Actions column.
- Click OK.
Automatically executes a scaling rule
Execution mode | Description |
---|---|
Executes a scaling rule by using a scheduled task | If your business load has obvious patterns, you can specify a scaling rule when you create a scheduled task. This way, Auto Scaling executes the scaling rule based on the point in time that is specified in the scheduled task. For information about how to create scheduled tasks, see Create a scheduled task. |
Executes a scaling rule by using an event-triggered task | If your business load does not have obvious patterns, you can specify a scaling rule when you create an event-triggered task. This way, Auto Scaling executes the scaling rule when the trigger conditions that are specified in the event-triggered task are met. For more information about event-triggered tasks, see Overview. |
Modify or delete a scaling rule
- If your scaling rule no longer meets your business requirements, you can modify the parameter settings of the scaling rule. You do not need to create a new scaling rule.
- If you no longer need a scaling rule, you can delete the scaling rule to free up the quota.