Event-triggered tasks incorporate the features of Auto Scaling and CloudMonitor. You can create event-triggered tasks to dynamically manage scaling groups. Similar to scheduled tasks, event-triggered tasks trigger specified scaling rules to execute scaling activities. This way, instances in scaling groups can be automatically scaled.

Introduction

If you can predict changes in your business workloads, you can create scheduled tasks to trigger scaling rules at the specified point in time. If you cannot predict changes in your business workloads, the scheduled tasks may not meet your business requirements. In this case, you can create event-triggered tasks to execute scale-out rules during peak hours. This ensures that services are not interrupted. You can also create the event-scheduled tasks to execute scale-in rules during off-peak hours to minimize resource costs.

You must specify the metrics that you want to monitor in the event-triggered tasks. The system then collects the metric data in real time. When the collected data meets alert conditions, the system triggers alerts and executes specified scaling rules. You can use event-triggered tasks to dynamically adjust the number of instances. This ensures that the changing requirements are met and the metric values are maintained within the expected range. You can create the following types of event-triggered tasks in the Auto Scaling console:

  • Event-triggered Tasks (System): standard event-triggered tasks. If you create this type of event-triggered task, you can select system-defined metrics to monitor. For more information, see Event-triggered task for system monitoring.
  • Event-triggered Tasks (Custom): custom event-triggered tasks. If you create this type of event-triggered task, Auto Scaling integrates your monitoring system into your event-triggered task in a standard manner. This way, your event-triggered task can meet more business requirements. For more information, see Custom monitoring event-triggered tasks.

Limits

  • If the Expected Number of Instances feature is enabled for a scaling group, Auto Scaling cannot execute other scaling activities for the scaling group when a non-parallel scaling activity is being executed. For more information, see Expected number of instances.
  • Event-triggered tasks cannot trigger scaling rules during the cooldown time. In most cases, Auto Scaling requires a few minutes to add Elastic Compute Service (ECS) instances or elastic container instances to a scaling group, start the instances, deploy services, and collect metric values. We recommend that you specify the cooldown time based on your business requirements. This can prevent the scaling rule from being repeatedly triggered when the metric data of newly added instances is not collected.
  • By default, the reference period of an event-triggered task is set to 1 minute. After an alert is reported, the scaling rule cannot be triggered within one minute.

Operations on event-triggered tasks

The following table describes the operations that you can perform on event-triggered tasks in different scenarios.

Scenario References
If you cannot predict changes in your business workloads, you can create an event-triggered task that is associated with a CloudMonitor metric in the Auto Scaling console to dynamically adjust the number of instances in your scaling group. Create an event-triggered task
If you want to obtain the details of your event-triggered task, you can click the name of the event-triggered task to view the configurations and metric value trends of the task. View, modify, or delete an alarm task
If your event-triggered task no longer meets your business requirements, you can simply modify one or more parameter settings of the event-triggered task or modify the trigger rule of the event-triggered task. You do not need to create a new event-triggered task.
If you no longer need an event-triggered task, you can disable or delete the event-triggered task.
If you want to use an event-triggered task that is in the Disabled state in your scaling group, you can enable the event-triggered task. Enable a monitoring task