This topic describes how to create a scaling configuration for a scaling group. Auto Scaling automatically scales out ECS instances based on the specified scaling configuration.
- Log on to the Auto Scaling console.
- In the top navigation bar, select a region.
- Find the scaling group and use one of the following methods to open the details page
of the scaling group:
- Click the ID of the scaling group in the Scaling Group Name/ID column.
- In the Actions column corresponding to the scaling group, click Details.
- In the upper part of the page, click the Configuration Source tab.
- Click the Scaling Configurations tab.
- Click Create Scaling Configuration.
- In the Basic Configurations step, configure the parameters and click Next: System Configurations.
The following table describes the parameters.
Parameter Description References Billing Method The following billing methods are supported in a scaling configuration:
- Pay-As-You-Go: Auto Scaling provisions and releases resources on demand. You pay for the resources that you used, and do not need to purchase a large number of resources in advance.
- Preemptible Instance: The market price of a preemptible instance fluctuates based on changes to the supply and demand of its instance type. Compared with pay-as-you-go instances, preemptible instances offer discounts but may be automatically reclaimed. You can use preemptible instances to reduce costs.
Instance Type Different instance types can meet the requirements of different scenarios. You can select multiple instance types in a scaling configuration. If resources of an instance type are insufficient, Auto Scaling automatically uses another instance type to create ECS instances. This increases the success rate of creating instances.
If you select a burstable instance type, you can set the default performance mode. For more information about burstable instances, see Overview.Note You can set weights for different instance types based on performance metrics such as the number of vCPUs. For more information, see Use performance metrics to measure Auto Scaling.
Instance families Image An image provides the data required to create ECS instances, such as the system and application environments, and related software configurations. Image overview Storage Select a system disk or one or more data disks for ECS instances to store data. Block Storage overview Public IP Address Assign IPv4 addresses to ECS instances for access to the Internet. If you select Assign Public IP Address, you must configure the billing method for network usage. Security Group A security group is a virtual firewall that controls network access of ECS instances.
- In the System Configurations (Optional) step, configure the parameters and click Next: Preview.
The following table describes the parameters.
Parameter Description References Tags Tags are used to identify resources. You can use tags to classify ECS instances and related resources for easy management and search. Resource Group Resource groups are used to categorize your resources based on usage, permissions, and regions. This way, you can manage the resources in a hierarchical manner based on users and projects. Resource groups Logon Credentials The supported logon credentials are subject to the operating system type.
- Linux: You can select an SSH key pair when you create a scaling configuration. You can also configure logon credentials after ECS instances are created.
- Windows: You can configure logon credentials only after ECS instances are created.
Instance Name This parameter specifies the name of the ECS instance. If you do not specify this parameter, a default name is used. None Host This parameter specifies the hostname of the ECS instance. If you do not specify this parameter, a default name is used. Set rules for generating sequential and unique hostnames RAM Role Instance RAM roles allow you to attach a role to ECS instances. You can use temporary tokens issued by Security Token Service (STS) to call API operations of other Alibaba Cloud services. This ensures the security of your AccessKey pair and helps you implement fine-grained permission control and management by using RAM.Note You can select instance RAM roles only for scaling configurations in a VPC-type scaling group. User Data User data is used to customize the startup behavior of an ECS instance or pass data to the ECS instance, such as automatically obtaining software resource packages, activating services, and displaying logs. You must prepare a custom script in advance and pass data to the script by using the User Data feature.Note You can specify user data only for scaling configurations in a VPC-type scaling group.
- In the Preview step, check your configurations, enter a scaling configuration name, and then click Create.
- In the Created dialog box, click Enable Configuration.