All Products
Search
Document Center

Auto Scaling:Overview

Last Updated:Nov 17, 2023

Auto Scaling allows you to create two types of notification rules: advanced notification rules and regular notification rules. If you use an advanced notification rule, Auto Scaling sends notifications to CloudMonitor or Message Service (MNS). This helps you learn about the dynamics of your scaling group in real time and implement automatic management of scaling events. You can use an advanced notification rule as a monitoring method. If you use a regular notification rule, you must manually handle the results of scaling events.

Notification rules

Auto Scaling supports advanced notification rules and regular notification rules.

Advanced notification rule

Auto Scaling sends notifications to CloudMonitor, MNS topics, or MNS queues after scaling activities are triggered in scaling groups. For more information, see Create an advanced notification rule.

  • CloudMonitor is a cloud service that provides statistics of cloud service events and an entry point to query these statistics. You can use CloudMonitor to learn about the status of your scaling groups in real time. For information about the event monitoring feature of CloudMonitor, see View system events.

  • MNS provides the MNS topic and MNS queue service models. MNS is a distributed messaging service that allows you to transfer data and messages between distributed components and build loosely coupled systems. For more information about MNS topics and MNS queue features, see What is MNS?

    • An MNS queue is a point-to-point messaging model that supports concurrent communications with high reliability. If you want to send a message to only one message consumer, you can use an MNS queue.

    • An MNS topic is a publish/subscribe messaging model. The publisher pushes a message to a topic, and then all subscribers to the topic receive and consume the message. In the MNS topic model, messages can be pushed to subscribers by using various methods and to multiple servers. Subscribers can receive messages from various channels.

Regular notification rule

Auto Scaling sends event notifications by text message, internal message, and email after a scaling activity succeeds, fails, or is rejected. After you receive the event notifications, you must manually resolve the issues if exceptions occur. For more information, see Create a regular notification rule.

Important

If you have created an advanced notification rule for a scaling group, you cannot create a regular notification rule for the scaling group. If you must create a regular notification rule for the scaling group, delete the advanced notification rule first.

Examples

In this section, several examples are provided to describe the event notification feature. For information about parameters, see Create an advanced notification rule.

  • CloudMonitor-based event notifications

    For example, when you created the notification rule, you set the Notification Method parameter to CloudMonitor and selected the following events: Successful Scale-out and Scale-out Started. After a scale-out is complete, Auto Scaling sends a notification together with the event details, including the event name, event level, event region, and resources that are consumed in the event, to CloudMonitor.

    The System Event page of CloudMonitor displays the details of the Scale-out Started event and the Successful Scale-out event. For information about how to view event details, see View system events.

    Note

    In addition to querying the event details in the CloudMonitor console, you can create alert rules to notify contacts by text message and email. This improves O&M efficiency.

  • MNS topic-based notifications

    For example, when you created the notification rule, you set the Notification Method parameter to MNS Topic, selected an MNS topic that resides in the same region as your scaling group, and then specified Scale-in Started as the event. After a scale-in is complete, Auto Scaling pushes a message to the specified MNS topic. The subscribers of the MNS topic can consume the message. The following figure shows the result of a successful scale-in. The number of notifications in the specified MNS topic increases. You can click View Subscriptions to view the details of the notification.

    An MNS topic does not support the direct consumption of notifications. Consumers must subscribe to the MNS topic by using an MNS queue, an HTTP protocol, or an email. When the MNS topic receives a message, the MNS topic pushes the message to the subscribers. This allows multiple subscribers to separately consume the message from the same publisher. This improves the efficiency of automated management.

    事件通知概述-MNS主题事件通知示例
  • MNS queue-based notification

    For example, when you created the notification rule, you set the Notification Method parameter to MNS Queue, selected an MNS queue that resides in the same region as your scaling group, and then selected the following events: Scale-out Started and Scale-out Failed. When a scale-out fails, Auto Scaling sends a notification to the specified MNS queue. Then, the MNS queue pushes the notification as a message to the subscribers for consumption. The following figure shows the result of a failed scale-out. The number of available notifications in the MNS queue increases.

    You can consume, delay, activate, or delete notifications based on your business requirements to flexibly automate notification management.

    事件通知概述-MNS队列事件通知示例

How do I manage a notification rule?

The following table provides links that are relevant to management of notification rules.

User guide

Operation

API reference

Create an advanced notification rule.

Manage an advanced notification rule.

CreateNotificationConfiguration

Modify an advanced notification rule.

ModifyNotificationConfiguration

Delete an advanced notification rule.

DeleteNotificationConfiguration

View an advanced notification rule.

Create a regular notification rule.

Create a regular notification rule.

N/A