The purpose of a scaling rule varies based on its type. A scaling rule can be used to trigger a scaling activity or automatically 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. For information about the limits and purpose of each type of scaling rule, see Overview.
- You can create only a limited number of scaling rules for a scaling group. To view the quota of scaling rules, go to 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
- Log on to the Auto Scaling console.
- In the left-side navigation pane, click Scaling Groups.
- In the top navigation bar, select the region where Auto Scaling is activated.
- Find the scaling group for which you want to create a scaling rule and click Details in the Actions column.
- In the upper part of the page that appears, click the Scaling Rules and Event-triggered Tasks tab.
- Click the Scaling Rules tab and then click Create Scaling Rule in the upper-right corner.
- In the Create Scaling Rule dialog box, configure parameters of the scaling rule.
- Click OK. After you create a scaling rule, the scaling rule appears on the Scaling Rules tab. You can click the ID of the scaling rule to view information, such as the rule type, unique identifier, execution time, and scaling operation of the scaling rule.
Execute a scaling rule
You must manually execute simple scaling rules and step scaling rules. You can allow 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 period of the scaling rule and immediately execute the scaling rule. Within the specified cooldown period, 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 the region where Auto Scaling is activated.
- 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 that appears, click the Scaling Rules and Event-triggered Tasks tab.
- On the Scaling Rules tab, find the scaling rule that you want to execute and click Execute in the Actions column.
- In the message that appears, 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. Auto Scaling executes the scaling rule when the trigger conditions that are specified in the event-triggered task are met. For information about how to create event-triggered tasks, see Manage event-triggered tasks. For 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 scaling rule quota.
- Log on to the Auto Scaling console.
- In the left-side navigation pane, click Scaling Groups.
- In the top navigation bar, select the region where Auto Scaling is activated.
- Find the scaling group whose scaling rule you want to modify or delete and click Details in the Actions column.
- In the upper part of the page that appears, click the Scaling Rules and Event-triggered Tasks tab.
- On the Scaling Rules tab, find the scaling rule that you want to modify or delete and click Edit or Delete in the Actions column.
Option Operation Modify a scaling rule - Find the scaling rule that you want to modify and click Edit in the Actions column.
- In the Edit Scaling Rule dialog box, modify parameter settings based on your business requirements and click OK.
For information about the parameters, see Create a scaling rule.
Note You cannot modify the setting of the Rule Type parameter for any type of scaling rules. You cannot modify the setting of the Start Time parameter for step scaling rules.
Delete a scaling rule - Find the scaling rule that you want to delete and click Delete in the Actions column.
- In the Delete Scaling Rule message, click OK.