All Products
Search
Document Center

Auto Scaling:Create a scaling configuration of the ECS type

Last Updated:Sep 24, 2024

This topic describes how to create a scaling configuration for a scaling group of the Elastic Compute Service (ECS) type. If a scale-out event is triggered, Auto Scaling uses the scaling configuration as the template to create ECS instances.

Prerequisites

  • A scaling group of the ECS type is created. If you want to set the Instance Configuration Mode parameter to Specify Instance Pattern when you create a scaling configuration in the scaling group, make sure that the network type of the scaling group is virtual private cloud (VPC). For more information, see Manage scaling groups.

  • A security group is created. If the network type of the scaling group is VPC, make sure that the security group and the scaling group reside in the same VPC. For more information, see Create a security group.

Procedure

  1. Log on to the Auto Scaling console.

  2. In the left-side navigation pane, click Scaling Groups.

  3. In the top navigation bar, select a region.

  4. On the Scaling Groups page, find the scaling group that you want to manage and click Details in the Actions column.

  5. In the upper part of the details page, click the Instance Configuration Sources tab.

  6. On the Scaling Configurations tab, click Create Scaling Configuration.

  7. Configure the parameters in the Basic Information, Image and Instance, and Network and Security Group sections based on your business requirements.

    For information about the parameters for creating a scaling configuration, see Parameters.

  8. Click Create. In the Preview Scaling Configuration message, confirm the configurations and click Create.

  9. Optional. Enable the scaling configuration.

    After you click Create, the The scaling configuration is created message appears. Click Enable to immediately put the scaling configuration into the Active state.

    Note

    You can also subsequently enable the scaling configuration on the Scaling Configurations tab. For more information, see Apply or enable scaling configurations.

Parameters

Basic Information section

Parameter

Description

References

Scaling Configuration Name

Enter a name for the scaling configuration. The name must meet the following requirements:

  • The name must be 2 to 40 characters in length.

  • The name must start with a letter or a digit.

  • The name can contain letters, digits, periods (.), underscores(_), and hyphens (-).

None

Billing Method

The following billing methods are supported:

  • Pay-As-You-Go: Auto Scaling allocates and releases resources on demand. You are charged only for the resources that you use. You do not need to purchase resources in advance.

  • Preemptible Instance: The market price of a preemptible instance varies based on the supply of and demand for the instance type. Preemptible instances are more cost-effective than pay-as-you-go instances. However, preemptible instances may be automatically reclaimed. You can use preemptible instances to reduce costs in specific business scenarios.

Instance and Image section

Parameter

Description

References

Select Image

An image can provide data, such as system and application environments and related software configurations, that is required to create ECS instances. Valid values:

  • Public Images: Public images are base system images provided by Alibaba Cloud or third-party partners and contain only initial system environments. If you use a public image, configure the application environment or related software based on your business requirements.

  • Custom Images: Custom images are images that are created from existing instances or snapshots and contain initial system environments, application environments, and related software configurations. You can use a custom image to reduce the amount of time required to create ECS instances.

    • If you manually modify the custom image in the scaling configuration, Auto Scaling does not automatically adjust the size of the current system disk. For more information, see Manually update an image in a scaling configuration.

    • If you create an image update task in the Auto Scaling console, Auto Scaling automatically creates a custom image for the source ECS instance and replaces the image that you specify in the scaling configuration when the image update task is executed. For more information, see Automatically update an image in a scaling configuration.

  • Shared Images: If another Alibaba Cloud user shares a custom image with you, the custom image is a shared image. Alibaba Cloud cannot ensure the security and integrity of shared images.

  • Marketplace Images: Alibaba Cloud Marketplace provides images that contain pre-installed operating systems, application environments, and software. Marketplace images are reviewed by Alibaba Cloud to ensure quality and stability. You can use these images to create instances without additional configurations in scenarios such as website creation, application development, and visualized management.

Instance Configuration Mode

Different business scenarios require different instance types. Auto Scaling supports the following instance configuration modes:

  • Specify Instance Pattern (Recommended): In this instance configuration mode, you do not need to specify instance types. You need to specify only computing attributes such as the number of vCPUs, memory size, instance family level, and maximum acceptable price based on your business requirements. Auto Scaling automatically matches the instance types that meet your business requirements based on the specified computing attributes and displays the instance types in the Preview Instance Type section. You can choose from the displayed instance types. This instance configuration mode effectively improves the success rate of scale-out events.

  • Specify Instance Type: In this instance configuration mode, you can specify multiple instance types at the same time. If one of the specified instance types does not have sufficient resources, Auto Scaling uses another instance type that has sufficient resources to create ECS instances. This instance configuration mode also greatly improves the success rate of scale-out events.

    Note

    You can specify weights for the instance types in the scaling configuration based on performance metrics, such as the number of vCPUs. For more information, see Use performance metrics to measure Auto Scaling.

    If you specify burstable instance types in the scaling configuration, Enable Unlimited Mode for Burstable Instances is cleared by default. You can select Enable Unlimited Mode for Burstable Instances based on your business requirements. For information about burstable instances, see Overview.

Overview of instance families

Select Instance Type

This parameter is displayed only if you set the Instance Configuration Mode parameter to Specify Instance Type.

You can select instance types by instance type name or vCPU number.

Note

You can select up to 10 instance types at the same time. Auto Scaling preferentially uses the top-ranked instance types.

After you select instance types, you can enable the following features based on your business requirements:

  • Enable Unlimited Mode for Burstable Instances: This feature takes effect only after you select burstable instances. This feature allows the burstable instance that hosts your application to exceed the baseline performance at any time. For more information, see Performance modes.

  • Measure Scaling Group Capacity by Using vCPUs: You can specify weights for the selected instance types. After you enable this feature, the current capacity of the scaling group is recalculated. This may trigger a scale-in or scale-out event in the scaling group. You can also use other performance metrics that are related to instance types, such as the memory size, to measure the capacity of your scaling group. For more information, see Use performance metrics to measure Auto Scaling.

Overview of instance families

Instance Attribute Combination

This parameter is displayed only if you set the Instance Configuration Mode parameter to Specify Instance Pattern.

You can search for the available instance types by the following attributes: vCPU, memory, instance family level, and maximum acceptable price. In the Preview Instance Type section, you can view the available instance types that meet your business requirements.

Note

You can select Add Instance Attribute Filters to add attribute filters, such as instance type architectures and burstable instance attributes, to search for the instance types that meet your business requirements. You can also select Specify Instance Types that Must Be Included to select the required instance types.

Overview of instance families

Storage section

Parameter

Description

References

System Disk

You can select the following types of system disks for ECS instances to store data: Enterprise SSD (ESSD), Standard SSD, Ultra Disk, and ESSD AutoPL.

More Disk Categories

You can specify multiple system disk categories in the Auto Scaling console to reduce the risk of scale-out failures caused by mismatch between disk categories and instance types or between disk categories and zones. Valid values: Basic Disk, Standard SSD, Ultra Disk, ESSD, and ESSD AutoPL. After you specify multiple disk categories, Auto Scaling preferentially uses the first specified disk category. The priority of the disk categories decreases based on the specified order.

Data Disk

You can specify the number of data disks based on your business requirements.

  • If you want to add data disks, click Add Data Disk (0/16) or the 图标 icon and specify the number and storage size of data disks. To create a data disk from a snapshot, click Create from Snapshot and select a snapshot.

  • To delete a data disk, click the 图标 icon.

More Disk Categories

You can specify multiple data disk categories in the Auto Scaling console to reduce the risk of scale-out failures caused by mismatch between disk categories and instance types or between disk categories and zones. Valid values: Basic Disk, Standard SSD, Ultra Disk, Enterprise SSD (ESSD), and ESSD AutoPL.

Network and Security Group section

Parameter

Description

References

Public IP Address

You can assign IPv4 addresses to ECS instances to enable Internet Access.

If you select Assign Public IPv4 Address, you must also configure the Bandwidth Billing parameter. Valid values of the Bandwidth Billing parameter: Pay-by-bandwidth and Pay-by-traffic.

  • Pay-by-traffic: You are charged for the outbound public bandwidth. This bandwidth metering method is suitable for scenarios in which your business has variable bandwidth requirements. For example, your business often requires a small amount of bandwidth but occasionally requires a bandwidth increase due to bursts of access traffic. To prevent unexpected bandwidth fees caused by bursts of access traffic, we recommend that you configure the Max. Bandwidth parameter to specify the allowed maximum bandwidth.

    Important

    If you use this bandwidth billing method, you are charged for the actual data transfer based on the pay-as-you-go billing method. Fees are deducted from your Alibaba Cloud account on an hourly basis. Make sure that your Alibaba Cloud account has sufficient balance.

  • Pay-by-bandwidth: Configure the Bandwidth parameter for the outbound public bandwidth. For example, you can set the Bandwidth parameter to 10 Mbit/s. This bandwidth billing method is suitable for scenarios in which your business traffic is stable and is more cost-effective than Pay-by-traffic.

Security Group

A security group is a virtual firewall that controls access to ECS instances.

Management Settings section

Parameter

Description

References

Logon Credentials

The setting of this parameter varies based on the operating system type of an ECS instance.

  • For Linux, you can set this parameter to Key Pair, Custom Password, or Set Later. A value of Set Later specifies that the logon password is configured only after you create the ECS instance.

  • For Windows, you can set this parameter to Custom Password or Set Later. A value of Set Later specifies that the logon password is configured only after you create the ECS instance.

Key Pair

This parameter is required only if you set the Logon Credentials parameter to Key Pair.

A key pair consists of a public key and a private key. Only I/O optimized instances support this parameter. If you set the Logon Credentials parameter to Key Pair, the username and password-based logon method is disabled.

Create an SSH key pair

Tag

You can use tags to identify resources. For example, you can use tags to classify ECS instances and related resources by purpose. This way, you can search for and filter resources in an efficient manner.

Note

A tag consists of a case-sensitive tag key and a tag value. The tag that you specify is added to all ECS instances and cloud disks that are created based on the scaling configuration.

Advanced Settings section

Parameter

Description

References

Resource Group

Resource groups allow you to classify your resources by purpose, permission, or ownership. This way, you can manage the resources across accounts and projects in an efficient manner.

Resource groups

Instance Name

The name series of ECS instances created from the scaling configuration. You can use this parameter to specify a unique and sequential instance name series. In this case, ECS instances that are created during scale-out events can be automatically named based on this series. This way, you can manage ECS instances in an efficient manner.

If you do not configure this parameter, Auto Scaling provides a default name for each ECS instance.

Configure naming rules for ECS instances

Host Name

The hostname series of ECS instances created from the scaling configuration. You can use this parameter to specify a unique and sequential hostname series. In this case, ECS instances that are created during scale-out events can be assigned hostnames based on this series. This way, you can manage ECS instances in an efficient manner.

If you do not configure this parameter, Auto Scaling provides a default hostname for each ECS instance.

RAM Role

You can assign Resource Access Management (RAM) roles to ECS instances. Then, you can use temporary Security Token Service (STS) credentials to call API operations of other Alibaba Cloud services. This ensures the security of your AccessKey pair and helps you perform fine-grained permission control and management by using RAM roles.

Note

You can select RAM roles only for scaling configurations of scaling groups that reside in VPCs.

Instance User Data

You can use the Instance User Data feature to configure the startup behavior of ECS instances or pass data to ECS instances to automatically obtain software packages, activate services, and print logs. You must write a custom script and pass data to the script by using the Instance User Data feature.

Note

You can enable the Instance User Data feature only for scaling configurations of scaling groups that reside in VPCs.

Instance user data

SLB Weight

The load balancing weight of each ECS instance created from the scaling configuration. Valid values: 1 to 100. If you already specified a weight when you associated a load balancer with your scaling group, the specified weight takes precedence over the value of the SLB Weight parameter.

Attach or detach SLB instances to or from scaling groups

Private Pool

You can use this parameter to ensure the availability of resources. Auto Scaling uses resources in the associated private pool to create ECS instances. After an elasticity assurance or a capacity reservation is created, Auto Scaling generates a private pool to reserve a specific number of instances that have specific attributes. Valid values:

  • Open: The resources in open private pools are prioritized over the resources in public pools. If no resource is available in private pools, Auto Scaling uses the resources in public pools.

  • Not Use: Auto Scaling uses the resources in public pools to create ECS instances.

  • Specific: Auto Scaling uses the resources in a specific private pool or an open private pool to create ECS instances. If all resources that are allocated to the specific private pool are used, ECS instances cannot be created.

Overview

Dedicated Host

To prevent resource contention and ensure security compliance, you can go to the Dedicated Host console to create a dedicated host. Auto Scaling creates ECS instances on the specified dedicated host to ensure that the ECS instances have exclusive physical resources.