• Auto Scaling

  1. Help Center
  2. Auto Scaling
  3. User Guide
  4. AS Management
  5. Scaling Actions
  6. Dynamically Expanding Resources

Dynamically Expanding Resources

Before using AS to perform scaling actions, you must specify how to perform the scaling actions to dynamically expand resources. For a web application that allows users to purchase train tickets, when the average CPU usage of the instances that run the application goes up to 90%, instances need to be added to ensure that services run properly. When the average CPU usage goes down to 40%, instances need to be reduced to prevent the waste of resources.

If your demands change frequently, you can also configure alarm policies for dynamically expanding or reducing resources. When the conditions for triggering an AS policy are met, AS automatically changes the expected number of instances for triggering a scaling action to scale up or down resources.


  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. Under Computing, click Auto Scaling. In the navigation pane on the left, choose Instance Scaling.
  4. Locate the row containing the target AS group and click View AS Policy in the Operation column.
  5. Click Add on the displayed AS Policies page.
  6. Configure required parameters. For details, see Table 1.
    Table 1 Parameters to be configured



    Example Value

    Policy Name

    Specifies the name of an AS policy.


    Policy Type

    Select Alarm.



    You can use an existing alarm rule or create a new one.

    To create an alarm rule, configure the following parameters:
    • Rule Name

      Specifies the name of the new alarm rule, for example, as-alarm-7o1u.

    • Trigger Condition

      Specifies a monitoring metric and condition for triggering a scaling action. For example, when the CPU usage becomes higher than 70%, AS automatically triggers a scaling action.

    • Monitoring Interval

      Specifies the interval (such as five minutes) at which the alarm status is updated based on the alarm rule.

    • Consecutive Occurrences

      Specifies the number of sampling points when an alarm is triggered. If Occurrences is set to n, the sampling points of the alarm rule are the sampling points in n consecutive sampling periods. Only if all the sampling points meet the threshold configured for the alarm rule will the alarm rule status be refreshed as the Alarm status.


    Scaling Action

    Specifies an action and the number/percentage of instances.

    The following scaling action options are available:
    • Add

      Adds instances to an AS group when the scaling action is performed.

    • Reduce

      Removes instances from an AS group when the scaling action is performed.

    • Set to

      Sets the expected number of instances in an AS group to a specified value.

    • Add 1 instance
    • Add 10% instances
      The number of instances to be added is 10% of the current number of instances in the AS group. If the product of the current number of instances and the percentage is not an integer, AS automatically rounds the value up or down:
      • Rounds down the value that is greater than 1.
      • Rounds up the value that is greater than 0 and less than 1 to 1.

    Cooldown Period

    Specifies a period of time after each scaling action is complete. During the cooldown period, scaling actions triggered by alarms will be denied. Scheduled and periodic scaling actions are not restricted.

    • If a scaling action is triggered by an AS policy, the cooldown period is that which is configured for that AS policy.
    • If a scaling action is triggered by manually changing the expected number of instances or by other actions, the cooldown period is that which is configured for the AS group.


  7. Click OK.

    The newly added AS policy is displayed on the AS Policy tab. In addition, the AS policy is in Enabled state by default.