All Products
Search
Document Center

Auto Scaling:Usage process

Last Updated:Jun 28, 2024

This topic describes Auto Scaling resources and the usage process to help you become familiar with the Auto Scaling concepts and how it works.

Usage process

Note

This topic describes how to use Auto Scaling in the Alibaba Cloud Management Console. For information about how to use Auto Scaling by calling API operations, see Process.

image
Note

If you set the Instance Configuration Source parameter to Launch Templates or Select Existing Instance when you create a scaling group, a scaling configuration is automatically created and becomes active. You do not need to manually recreate a scaling configuration. After the process for creating a scaling group is complete, you can directly enable the scaling group.

  1. Create a scaling group

    A scaling group is a group of instances of the same type that you can use in similar business scenarios. When you create a scaling group, you can define attributes such as the minimum and maximum instance limits, template used for scale-out events, and scale-in policy. For more information, see Overview.

  2. Create a scaling configuration

    A scaling configuration is a template used by Auto Scaling to automatically create Elastic Compute Service (ECS) instances or elastic container instances. For more information, see Overview.

  3. Enable the scaling configuration

    If a scaling group has no active scaling configuration, a message prompts you to enable a scaling configuration after you create the scaling configuration. Multiple scaling configurations can be created for a scaling group, but only one of them can be active at a time. For more information, see Manage scaling configurations.

  4. Enable the scaling group

    Scaling events occur only in scaling groups that are in the Enabled state. When a scaling group has an active scaling configuration, a message prompts you to enable the scaling group. You can also go to the Scaling Groups page to manually enable a scaling group. For more information, see Enable a scaling group.

  5. Creates a scaling rule

    A scaling rule specifies the action for scaling instances. This helps you manage the number of instances added to or removed from a scaling group. For more information, see Overview.

  6. Execute the scaling rule

    To execute the scaling rule, you can use one of the following methods. For more information, see Execute a scaling rule.

    • Manual execution: This method is suitable for addressing temporary business demands.

    • Automatic execution by triggering a scheduled task: You can use a scheduled task to enable the execution of a scaling rule at a specified point in time. This method is suitable for managing workload fluctuations that follow specific patterns.

    • Automatic execution by triggering an event-triggered task: You can use an event-triggered task to monitor a specific metric, report alerts, and enable the execution of a scaling rule. This method is suitable for managing workload fluctuations that do not follow specific patterns.

Video tutorial

Scenarios

Scenario description and example

References

For short-term business needs, it can be challenging to determine the number of servers to add and the timing for adding the servers, especially when no monitoring metric is available. In such cases, manual adjustment of servers is required.

For instance, if a company requires additional servers for testing purposes due to short-term business needs, manual oversight is required to determine the number of servers to add or remove, as well as the timing for these adjustments.

Manually scale ECS instances with a few clicks

If your workload fluctuations follow a predictable pattern and distinct peak and off-peak hours can be identified based on time, you can use Auto Scaling to automatically increase or decrease the number of ECS instances at designated time points accordingly.

For example, a game company experiences a consistent increase in business workloads from 18:00:00 to 23:00:00 nightly, requiring the addition of servers during this period. However, only a fixed number of servers are required to maintain regular operations during other periods.

Scale ECS instances by using scheduled tasks

If your workload experiences dynamic fluctuations, you may find it challenging to determine the optimal number of servers and the timing for adding or removing servers. In this case, if you intend to adjust the server capacity based on real-time workloads, you can create event-triggered tasks in the Auto Scaling console.

For example, the traffic of a news website is unpredictable. A surge of page views occurs with breaking news, but the views drop when the news loses its timeliness.

Scale ECS instances by using event-triggered tasks