Creating a Scaling Policy

Last updated: 2020-08-06 16:47:48

    You can use scaling policies to increase or decrease the number of CVM instances in your scaling group:

    • Create a scheduled action to perform scheduled scaling, which can be set to run periodically.
    • Create an alarm-triggered policy to perform scaling based on Cloud Monitor metrics (such as CPU utilization and memory usage).

    Creating a Scheduled Action

    Scenario

    If your load changes are predictable, you can set a scheduled action to plan your scaling activities. This feature can automatically add or remove CVM instances according to a schedule. This allows you to flexibly cope with traffic load changes and improve device utilization while reducing deployment and instance costs.

    Directions

    1. Log in to the Auto Scaling console and select Scaling Groups in the left sidebar.
    2. On the Scaling Groups page, select a scaling group ID, as shown in the following figure:
      Scaling group
    3. On the management page of the scaling group, select the Scheduled Action tab and click Create, as shown in the following figure:
    4. In the Create Scheduled Action window that pops up, specify the action name, startup time, activity, and other information as shown in the following figure:
    5. Click OK to complete the configuration. Then, the created scheduled action will be displayed in the list on the page, as shown in the following figure:

    Creating an Alarm-Triggered Policy

    Scenario

    If you want to adjust the scaling based on CVM metrics, you can create an alarm-triggered policy. This policy helps increase or decrease instances in the scaling group to handle dynamic volumes, increase machine utilization, and reduce expenses on deployment and instances.

    Directions

    Note:

    • When a scaling group is created, a ping unreachable alarm-triggered policy is created by default, which is used to replace unhealthy CVMs.
    • Before using an alarm-triggered policy, you need to install the latest version of Cloud Monitor agent in the CVM image. For more information, see Installing Monitoring Components.
    1. Log in to the Auto Scaling console and select Scaling Groups in the left sidebar.
    2. On the Scaling Groups page, select a scaling group ID, as shown in the following figure:
      Scaling group
    3. On the management page of the scaling group, select the Alarm-triggered Policy tab and click Create, as shown in the following figure:
    4. In the Create an Alarm-triggered Policy window that pops up, set up the policy as shown in the following figure:
      The scaling policy automatically adds or removes CVM instances in the scaling group by a specified number or percentage based on cloud monitoring performance metrics (such as CPU utilization, memory usage, and bandwidth). You can also copy existing policies from an existing scaling group to the current scaling group.
    5. Click OK to complete the configuration, and the created alarm-triggered policy will be displayed in the list on the page, as shown in the following figure:

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help