Managing an Alarm-triggered Policy

Last updated: 2020-08-06 16:45:54

    Introduction

    With Auto Scaling (AS), you can increase or decrease CVMs in a scaling group based on monitoring metrics. You only need to define an alarm-triggered policy, specifying the status of the monitoring metrics that trigger scaling and the related scaling activity.

    You need to specify the conditions and actions when creating an alarm policy, as shown in the figure below:

    • Condition format: a metric + threshold + period + number of consecutive periods during which the threshold is reached. This indicates an alarm is triggered when the value of the metric breaches the threshold that you defined for the number of periods that you specified.
    • Execution actions: sending notification(s) + adding/removing the specified number of CVMs

    We recommend you create two policies for each scaling group, one for scale-out and one for scale-in. Once the traffic to your web application reaches the threshold of the alarm policy, AS executes the associated policy to scale your group in (by terminating instances) or out (by launching instances).

    Scenarios

    For example, assume you have an e-commerce web application that currently runs on five instances. You plan to carry out a promotional activity and are concerned that the access traffic might be much greater than you expect. In this case, you can configure a scaling group to add two new instances when the load on the current instances reaches 70%, and terminate extra the instances when the load decreases to 40%. This is shown in the figure below:

    Directions

    1. Log in to the Auto Scaling Console and click Scaling Groups in the left sidebar.
    2. Select the scaling group to be modified and click the Scaling Group ID to go to the basic information page, as shown in the figure below:
    3. On the details page of the scaling group, select the Alarm-Triggered Policy tab and configure the alarm trigger policy associated with the scaling group on this page, as shown in the figure below:
      • Click Create to add a new alarm-triggered policy.
      • Click Delete to delete the alarm-triggered policy.

    Preventing specified CVMs from being removed by the scaling policy

    For the proper running of your existing business, if the CVMs in the cluster are used for the following purposes, you need to prevent them from being removed by the scale-in policy:

    • Multiple purposes: apart from the tasks specified by the cluster, a CVM in the cluster is also used for other purposes, for example the CVM is used as both a cache server and a file server.

    • Data storage: the CVM is stateful or stores data that other CVMs do not have. For example, the CVM stores the incremental data of other running CVMs in a cluster.

    • Image/Snapshot updates: the CVM is used to regularly update images and snapshots.

    Configuration:

    1. In the Scaling Group List, click the scaling group to which the CVM belongs to go to the management page.
    2. In the Instance List at the bottom of the management page, click Enable Removal Protection for the instance.

    Was this page helpful?

    Was this page helpful?

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