Creating a Scaling Policy

Last updated: 2020-02-25 15:18:24

PDF

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 trigger policy To perform scaling adjusted by Cloud Monitor metrics (e.g., CPU utilization and memory usage).

Creating a Scheduled Scaling Action

Scenario

Scheduled Scaling works better in business scenarios where volume is stable and predictable. You can use it to automatically add/remove CVM instances at a specified point of time or periodically to meet changing needs, increase machine utilization, and reduce expenses on deployment and instances.

Directions

  1. Log in to the AS console .
  2. On the "Scaling group" page, click "Scaling group".
    Scaling group
  3. On the scaling group management page, select the "Scheduled Action" tab and click CREATE .
    Scheduled scaling action
  4. In the pop-up "Create timing job" window, specify the timing job name, execution time and execution activities and other information. You can also select Duplicate to run the scheduled action on a periodic basis. as shown below:
    Create scheduled action
  5. Click [OK] to complete the settings. , then you will see the created scheduled action on the list, as shown below:
    Scheduled action list

Creating an Alarm Trigger Policy

Scenario

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

Directions

  • By default, a ping is created in a scaling group to trigger the alarm that tells you to replace unhealthy servers.
  • Before using the alarm trigger policy, you need to install a new version of Cloud Monitor Agent in Image of CVM. Installation method see synonyms at installation Install the monitoring component .
  1. Log in to the AS console .
  2. On the "Scaling group" page, click "Scaling group".
    Scaling group
  3. On the scaling group management page, select the "Alarm Trigger Policy" tab and click CREATE .
  4. In the "Create Alarm Policy" window, set the alarm policy.
    When the Alarm Trigger policy is in effect, the scaling group adjusts the number of instances or the percentage of the instance by Cloud Monitor metrics (e.g., CPU utilization, memory usage, and bandwidth).
    Create an alarm-triggered policy
  5. Click [OK] to complete the settings. , then you will see the created alarm trigger policy on the list on the page, as shown below:
    Alarm-triggered policy list