Clone a vertical scaling task

更新时间:
复制 MD 格式

To quickly create a vertical scaling task, clone an existing one and modify its configuration.

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 a region.

  2. Find the target vertical scaling task and click Clone in the Actions column.

  3. On the Clone Vertical Scaling Task page, modify the task configuration.

    The following table describes the parameters.

    Parameter

    Description

    Task Type

    The direction of the vertical scaling action. Valid values:

    • Upgrade: Increases the computing power of the target instance by upgrading its instance type.

    • Downgrade: Decreases the computing power of the target instance by downgrading its instance type.

    Select instance

    Specifies the target instance for the task.

    Select Instance Type

    The instance types to which the target instance can be scaled. If you specify multiple instance types, the task scales the instance to the instance types in the specified order.

    Important

    In a vertical scaling task, you can adjust the instance type only within the same instance family.

    • Upgrade specifications: Specify up to 10 instance types in ascending order of computing power. Each subsequent instance type must have more vCPUs and memory than the previous one.

      For example, if the current instance type is ecs.g6.large and you specify ecs.g6.3xlarge, ecs.g6.4xlarge, and ecs.g6.6xlarge in sequence, the instance type changes to ecs.g6.4xlarge after two consecutive upgrade tasks.

    • Downgrade specifications: Specify up to five instance types in descending order of computing power. Each subsequent instance type must have fewer vCPUs and memory than the previous one.

      For example, if the current instance type is ecs.g6.6xlarge and you specify ecs.g6.4xlarge, ecs.g6.3xlarge, and ecs.g6.large in sequence, the instance type changes to ecs.g6.large after three consecutive downgrade tasks.

    Trigger Type

    The method used to trigger the vertical scaling task. Valid values:

    • Scheduled Trigger: The task is executed based on a schedule that you define. You must specify the execution frequency and time.

      • One-time execution: You can select Execute Now, or select Execute Once at Specified Time and specify an execution time.

      • Recurring execution: Select Executed Periodically, and then configure a recurrence frequency, time zone, and end time.

        You can click Quick Selection to configure the recurrence frequency, or directly enter a cron expression. For more information about cron expressions, see Cron expressions.

        Important

        When a vertical scaling task upgrades or downgrades a pay-as-you-go instance, the instance is restarted, which causes a service interruption. We recommend scheduling these tasks during off-peak hours.

    • Event-triggered: The task is executed when a threshold-based rule is met. You must specify a threshold-based rule and a trigger mute period.

      • Rule: Specify a threshold condition for a CloudMonitor metric. A threshold-based rule includes a metric name, an aggregation period, the number of times the threshold must be breached, a statistical method, a comparison operator, and a threshold.

        The following figure shows an example. The vertical scaling task is triggered if the average value of the DiskIOPSWrite metric exceeds 70 for three consecutive 5-minute periods.规则示例

      • Trigger mute period: If monitoring data continues to exceed the threshold, the task executes only once during the mute period.

        Important

        We recommend that you configure the threshold condition with caution. If the number of times that the threshold must be breached is too small or the trigger mute period is too short, the ECS instance may be frequently stopped, scaled, and started, which disrupts your services.

    Permission source

    The permissions for the RAM role that Operation Orchestration Service (OOS) assumes.

    • If you are using the vertical scaling feature for the first time, you must create a RAM role for OOS and grant the RAM role the permissions to manage ECS and Auto Scaling resources. For more information, see Create a RAM role for a trusted Alibaba Cloud service and Manage the permissions of a RAM role.

      Note

      We recommend that you attach the AliyunECSFullAccess and AliyunESSFullAccess policies.

    • If you have used the vertical scaling feature before, select an existing RAM role, such as OOSServiceRole.

    Advanced

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

  4. Click Create Vertical Scaling Task.

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.