All Products
Search
Document Center

Auto Scaling:Quick references

Last Updated:Oct 24, 2023

This topic describes the common operations in the Auto Scaling console.

Create scaling groups

The first time you use Auto Scaling, you can perform the operations described in the following table.

Item

User guide

API reference

Description

Scaling group

Create scaling groups

CreateScalingGroup

You can create scaling groups to manage Elastic Compute Service (ECS) instances or elastic container instances based on your business requirements.

Scaling configuration

If you do not specify the instance configuration source when you create a scaling group, you must create a scaling configuration. A scaling group can contain ECS instances or elastic container instances.

Scaling rule

Create a scaling rule

CreateScalingRule

You can create scaling rules to control the number of ECS instances or elastic container instances in scaling groups. You can also use scaling rules to adjust the minimum and maximum numbers of instances in scaling groups.

Lifecycle hook

Create lifecycle hooks

CreateLifecycleHook

When Auto Scaling triggers lifecycle hooks in scaling groups, the ECS instances or elastic container instances that are involved in scale-outs or scale-ins enter the Pending Add or Pending Remove state. You can perform custom operations on the instances until the lifecycle hooks time out.

Scheduled task

Create a scheduled task

CreateScheduledTask

You can create scheduled tasks to specify a time period for automatic scale-outs or scale-ins.

Event-triggered task

Create event-triggered tasks

CreateAlarm

You can create event-triggered tasks to enable metric-based dynamic scale-outs or scale-ins.

View scaling groups

If you want to query the details of scaling groups, instances, scaling rules, event-triggered tasks, and scaling activities, you can perform the operations described in the following table.

Item

User guide

API reference

Description

Scaling group

View or modify scaling groups

DescribeScalingGroups

You can query the basic configurations of existing scaling groups.

Instance list

View instances in a scaling group

DescribeScalingInstances

You can query information about instances in a scaling group.

Scaling rule

View the prediction effect of a predictive scaling rule

N/A

You can check whether the prediction based on a predictive scaling rule meets your expectations so that you can determine whether to make adjustments.

Event-triggered task

View event-triggered tasks

DescribeAlarms

You can view the basic information, trigger rules, and monitoring information of an event-triggered task. Then, you can understand the configurations of the event-triggered task and the data trends of metrics.

Scaling activity

View the details of a scaling activity

If a scaling activity is triggered by a scheduled or event-triggered task, you can view the details of the scaling activity to check its execution result.

Scaling group monitoring

N/A

  • The scaling group monitoring feature allows you to view the changes in the number of instances in different states in a scaling group. This allows you to obtain resource utilization of the scaling group over a specified period of time.

  • The scaling group monitoring feature also allows you to view the metrics of all ECS instances in a scaling group to learn about the resource utilization of the scaling group over a specified period of time. For example, you can view the statistical data of the CPU utilization, memory usage, load, system disks, and network usage.

Manage scaling groups

If you want to manage scaling groups, instances, scaling configurations, scaling rules, scheduled tasks, and event-triggered tasks, you can perform the operations described in the following table.

Item

User guide

API reference

Description

Scaling group

  • You can resume a suspended process in a scaling group. This allows the scaling group to continue the specified process based on the functional logic of the scaling group. You can suspend a process in a scaling group. Then, you can perform other operations based on your business requirements.

  • You can scale instances only when scaling groups are in the Enabled state. You can disable a scaling group that is not currently required.

Instance list

  • To maximize the utilization of existing computing resources, you can manually add existing instances to your scaling group.

  • You can manually switch instances from one state to another state based on your business requirements. For example, you can put an instance that you no longer require into the Standby state, move an instance out of the Standby state, or put an instance that you do not want to remove from your scaling group into the Protected state. If the Instance Reclaim Mode parameter of your scaling group is set to Economical Mode, you can manually put an instance in your scaling group into the Stopped state.

  • If instances are not evenly distributed across multiple zones due to insufficient resources, you can use Balanced Distribution Policy to evenly redistribute instances across the zones.

Scaling configuration

Manage scaling configurations

N/A

  • After you apply a scaling configuration, Auto Scaling creates instances based on the scaling configuration when a scale-out is triggered.

  • You can export scaling configurations to back them up on an on-premises disk, or import them to other scaling groups.

  • You can import the scaling configurations of a scaling group to another scaling group. This saves your time to create scaling configurations.

Scaling rule

Execute a scaling rule

ExecuteScalingRule

You can execute scaling rules for manual or automatic scaling.

Scheduled task

Enable or disable a scheduled task

N/A

  • If you want to reuse a scheduled task that is in the Disabled state, you can enable the scheduled task again and execute the scheduled task during the specified time range.

  • You can disable scheduled tasks that are not currently required.

Event-triggered task

Disable or enable event-triggered tasks

  • If you want to reuse an event-triggered task that is in the Disabled state, you can enable the event-triggered task again.

  • You can disable event-triggered tasks that are not currently required.

Modify scaling groups

If you want to modify scaling groups, scaling configurations, scaling rules, lifecycle hooks, scheduled tasks, and event-triggered tasks, you can perform the operations described in the following table.

Item

User guide

API reference

Description

Scaling group

View or modify scaling groups

ModifyScalingGroup

If your scaling group cannot meet your business requirements, you can modify the parameter settings of the scaling group.

Scaling configuration

  • You can modify scaling configurations to meet your specific requirements.

  • Images in scaling configurations are frequently updated to meet business requirements. You can manually modify the images in a scaling configuration or enable automatic update of images to meet your specific requirements.

Scaling rule

Modify or delete a scaling rule

ModifyScalingRule

If your scaling rule cannot meet your business requirements, you can modify the parameter settings of the scaling rule.

Lifecycle hook

Modify or delete lifecycle hooks

ModifyLifecycleHook

If your lifecycle hook cannot meet your business requirements, you can modify the parameter settings of the lifecycle hook.

Scheduled task

Modify or delete a scheduled task

ModifyScheduledTask

If your scheduled task cannot meet your business requirements, you can modify the parameter settings of the scheduled task.

Event-triggered task

Modify or delete event-triggered tasks

ModifyAlarm

If your event-triggered task cannot meet your business requirements, you can modify the parameter settings of the event-triggered task. You can modify the trigger rules for event-triggered tasks. You can also add multiple trigger rules or delete all existing trigger rules.

Delete scaling groups

If you no longer require your scaling groups, instances, scaling configurations, scaling rules, lifecycle hooks, scheduled tasks, and event-triggered tasks, you can perform the operations described in the following table.

Item

User guide

API reference

Description

Scaling group

Delete scaling groups

DeleteScalingGroup

When you delete scaling groups, the scaling configurations and scaling rules in the scaling groups are also deleted. You can delete scaling groups that you no longer require to free up the scaling group quota.

Instance list

Manually remove or delete instances

You can manually delete instances or remove instances that you no longer require from scaling groups.

Scaling configuration

Modify or delete scaling configurations

You can delete scaling configurations that you no longer require to free up the scaling configuration quota.

Scaling rule

Modify or delete a scaling rule

DeleteScalingRule

You can delete scaling rules that you no longer require to free up the scaling rule quota.

Lifecycle hook

Modify or delete lifecycle hooks

DeleteLifecycleHook

You can delete lifecycle hooks that you no longer require to free up the lifecycle hook quota.

Scheduled task

Modify or delete a scheduled task

DeleteScheduledTask

You can delete scheduled tasks that you no longer require to free up the scheduled task quota.

Event-triggered task

Modify or delete event-triggered tasks

DeleteAlarm

You can delete event-triggered tasks that you no longer require to free up the event-triggered task quota.