All Products
Search
Document Center

Auto Scaling:Clone a vertical scaling task

Last Updated:Nov 20, 2023

If you want to quickly create a vertical scaling task, you can clone an existing vertical scaling task and modify configurations based on your business requirements.

Procedure

  1. Go to the Vertical Scaling page.

    1. Log on to the Auto Scaling console.
    2. In the left-side navigation pane, click Vertical Scaling.
    3. In the top navigation bar, select the region where Auto Scaling is activated.
  2. On the Vertical Scaling page, find the vertical scaling task that you want to clone and click Clone in the Actions column.

  3. On the Clone page, modify the parameters of the vertical scaling task based on your requirements.

    The following table describes the parameters.

    Parameter

    Description

    Type

    The direction of the vertical scaling task. Valid values:

    • Upgrade: Instance specifications are upgraded to increase the computing power.

    • Downgrade: Instance specifications are downgraded to reduce the computing power.

    Select Instances

    The instances for which you want to create the vertical scaling task.

    Select Instance Specifications

    The instance type that you want to use. If you specify multiple instance types, the vertical scaling task is executed based on the order of the instance types.

    Note

    You can specify an instance type that is of the same instance family as the current instance type in a vertical scaling task.

    • Upgrade specifications: You can specify up to 10 instance types in ascending order. The number of vCPUs and memory size of the latter instance type must be higher than those of the previous instance type.

      For example, if the current instance type is ecs.g6.large, the next three instance types must be ecs.g6.3xlarge, ecs.g6.4xlarge, and ecs.g6.6xlarge. If you have executed the vertical scaling task for two consecutive times, the final instance type is ecs.g6.4xlarge.

    • Downgrade specifications: You can specify up to 5 instance types in descending order. The number of vCPUs and memory size of the latter instance type must be lower than those of the previous instance type.

      For example, if the current instance type is ecs.g6.large, the next three instance types must be ecs.g6.4xlarge, ecs.g6.3xlarge, and ecs.g6.large. If you have executed the vertical scaling tasks for three consecutive times, the final instance type is ecs.g6.large.

    Trigger Type

    The mode in which the vertical scaling task is triggered. Valid values:

    • Scheduled Trigger: You must specify the execution time of the task.

      • One-time execution: You can select Execute Now. You can also select Executed Once at the Specified Time and specify a scheduled point in time.

      • Repeated execution: You must first select Executed Periodically and then specify an execution frequency, a time zone, and an end time of repeated execution. You can click Quick Selection to create custom configurations. You can also use a cron expression to specify the execution frequency. For more information about cron expressions, see Configure cron expressions.

        Important

        A pay-as-you-go instance must be restarted when the instance is upgraded or downgraded in a vertical scaling task. In this process, your services are interrupted. We recommend that you schedule the task to run in off-peak hours.

    • Threshold Trigger: You must specify a threshold rule and trigger mute period.

      • Rule Description: Specify a threshold rule for statistical values of a CloudMonitor metric. The threshold rule contains the following configurations: metric name, aggregation period of monitoring data, number of times that statistics are collected, statistical method, comparison operator, and threshold. In the following figure, the metric is DiskIOPSWrite and the aggregation period of monitoring data is 5 minutes. If the average value of DiskIOPSWrite exceeds 70 for three consecutive times, the vertical scaling task is triggered. 规则示例

      • Trigger Mute Period: During the specified trigger mute period, the vertical scaling task can be executed only once.

        Important

        We recommend that you configure an appropriate threshold rule. If the number of times that statistics are collected is smaller or if the mute period is shorter than required, ECS instances may be frequently started, stopped, and upgraded or downgraded. This affects the service availability.

    Permissions

    The permissions of the Resource Access Management (RAM) role that is assumed by Operation Orchestration Service (OOS).

    • The first time you use the vertical scaling feature, you must create a RAM role for OOS and grant the required permissions on ECS and Auto Scaling to the RAM role. For more information, see Create a RAM role for a trusted Alibaba Cloud service and Grant permissions to a RAM role.

      Note

      We recommend that you attach the AliyunECSFullAccess and AliyunESSFullAccess policies to the RAM role.

    • If you already used the vertical scaling feature, select an existing RAM user, such as OOSServiceRole.

    Advanced

    Optional. You can add a description and tags to the vertical scaling task. This facilitates subsequent task query and management.

  4. Click Create Vertical Scaling.

Result

After the vertical scaling task is created, the system executes the task at the specified time or when the threshold condition is met. Operations such as stopping the instance, changing the instance type, and restarting the instance are automatically performed. You can view the execution details of the task. For more information, see View a vertical scaling task.