Clone a vertical scaling task

Updated at:
Copy as MD

Clone an existing vertical scaling task to reuse its configuration as a starting point, then adjust parameters to fit your requirements.

Warning

Upgrading or downgrading a pay-as-you-go instance requires a restart. During this time, your services are interrupted. Schedule the task to run during off-peak hours.

Prerequisites

Before you begin, ensure that you have:

Clone a vertical scaling task

  1. Log on to the Auto Scaling console.

  2. Log on to the Auto Scaling console.

  3. In the left-side navigation pane, click Create Vertical Scaling Task.

  4. In the top navigation bar, select the region where Auto Scaling is activated.

  5. On the Create Vertical Scaling Task page, find the task to clone and click Clone in the Actions column.

  6. On the Clone page, configure the parameters described in the following sections.

  7. Click Create Vertical Scaling Task.

Parameters

Type

The direction of the scaling action:

  • Upgrade: increases instance computing power by moving to a higher instance type.

  • Downgrade: reduces instance computing power by moving to a lower instance type.

Select instances

The ECS instances for which the task runs.

Select instance specifications

The instance types to scale through. The task executes them in the order listed.

All instance types must belong to the same instance family as the current instance type.

Upgrade specifications

List up to 10 instance types in ascending order. Each subsequent type must have more vCPUs and memory than the previous one.

Example: if the current type is ecs.g6.large and you add ecs.g6.3xlarge, ecs.g6.4xlarge, and ecs.g6.6xlarge, after two consecutive executions the instance type becomes ecs.g6.4xlarge.

Downgrade specifications

List up to 5 instance types in descending order. Each subsequent type must have fewer vCPUs and memory than the previous one.

Example: if the current type is ecs.g6.large and you add ecs.g6.4xlarge, ecs.g6.3xlarge, and ecs.g6.large, after three consecutive executions the instance type becomes ecs.g6.large.

Trigger type

Scheduled trigger

The task runs at the time you specify:

  • Execute Now: runs the task immediately after creation.

  • Executed Once at the Specified Time: runs the task once at a scheduled point in time.

  • Executed Periodically: runs the task on a recurring schedule. Specify an execution frequency, time zone, and end time. Click Quick Selection for preset options, or enter a cron expression directly. For cron expression syntax, see Configure cron expressions.

Threshold trigger

The task runs when a CloudMonitor metric crosses a threshold you define.

Configure the following in Rule Description:

Setting Description
Metric name The CloudMonitor metric to monitor, for example, DiskIOPSWrite
Aggregation period The interval over which monitoring data is aggregated, for example, 5 minutes
Number of collections How many consecutive periods the threshold must be breached before the task triggers, for example, 3 times
Statistical method How values within each period are aggregated, for example, average
Comparison operator The condition for comparison, for example, greater than
Threshold The value that triggers the task, for example, 70

The following figure shows an example rule: if the average DiskIOPSWrite exceeds 70 for three consecutive 5-minute periods, the task is triggered.

Example threshold rule

Trigger mute period: after the task runs, it cannot run again until the mute period ends. If the number of times that statistics are collected is too small or the mute period is too short, ECS instances may be started, stopped, and resized frequently, which reduces service availability.

Permissions

The RAM role that OOS assumes to perform scaling operations.

  • First-time setup: select the RAM role created in the Prerequisites section, such as OOSServiceRole.

  • Already configured: select your existing RAM role.

Advanced (optional)

Add a description and tags to the task to make it easier to search and manage.

What's next

After the task is created, Auto Scaling executes it at the scheduled time or when the threshold condition is met. The task automatically stops the instance, changes its type, and restarts it.

To monitor execution progress and results, see View a vertical scaling task.