You must first create a scaling group and a scaling configuration to implement automatic scaling. A scaling group is a group of Elastic Compute Service (ECS) instances that provide the same service. A scaling configuration is a template used by a scaling group to create ECS instances. This topic describes how to create a scaling group, create a scaling configuration for the scaling group, and enable the scaling group. The minimum number of ECS instances in the scaling group is set to one.
After a scaling group is created, its region cannot be changed. For more information, see Regions and zones.
Step 1: Create a scaling group
In this example, a scaling group is created with simple settings. For more information about the parameters, see Create a scaling group.
- Log on to the Auto Scaling console.
- In the left-side navigation pane, click Scaling Groups.In this example, the operations are performed on the Scaling Groups page. If you have no scaling resources in the current region, the welcome page is displayed after you log on to the console. You can follow the instructions on the page.
- In the top navigation bar, select a region.
- In the upper-left corner of the Scaling Groups page, click Create.
- Configure parameters for the scaling group and click OK.The following table describes the parameters used in this example. For parameters that are not described in the following table, use the default values.
Parameter Example Description Scaling Group Name MyFirstScalingGroup None Instance Configuration Source Create from Scratch If you create a scaling group from scratch, the created scaling group does not have an instance configuration source. You must create a scaling configuration for the scaling group. Tag ESS:Documentation Tags are used to categorize the scaling group for easy management. Minimum Number of Instances 1 The scaling group must contain at least one ECS instance. If the number of ECS instances in the scaling group is zero, an instance is automatically created for the scaling group. Maximum Number of Instances 3 A maximum of three ECS instances can be created for the scaling group. Excess ECS instances will be automatically removed from the scaling group. Network Type Classic Network When you create a scaling configuration, you can select only instance types that support the classic network.
- In the Create Scaling Group dialog box, click OK.
Step 2: Create a scaling configuration and enable the scaling group
In this example, a scaling configuration is created with simple settings. For more information about the parameters, see Create a scaling configuration.
- 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.
- Click Details in the Actions column.
- In the upper part of the page, click the Configuration Source tab.
- In the upper-left corner of the page, click the Scaling Configurations tab.
- Click Create Scaling Configuration.
- Configure parameters for the scaling configuration and click Create.The following table describes the parameters used in this example. For parameters that are not described in the following table, use the default values.
Configuration type Parameter Example Description Basic Configurations Billing Method Pay-As-You-Go Auto Scaling is free of charge. However, you must pay for the ECS instances added to the scaling group based on the pricing of ECS. For more information, see Billing overview. Instance Type Shared balanced type: ecs.mn4.small Scaling groups in a VPC support more newly released instance types. For more information about how to create a scaling group in a VPC, see Create a scaling group. Image Public image: CentOS 7.6 64-bit After the instance is started, the operating system and application data of the image are copied to the system disk. Public IP Address Pay-by-traffic. A peak bandwidth of 1 Mbit/s You are charged for the outbound public traffic based on the traffic volume. The peak bandwidth is 1 Mbit/s. Security Group sg-bp18kz60mefsicfg**** Select the security group that you created in advance. System Configurations Logon Credentials Set Later You can manually set the password for ECS instances after the ECS instances are created. Create Scaling Configuration Name MyFirstScalingConfiguration None
- In the Created dialog box, click Enable Configuration.
- In the Enable Scaling Configuration message, click OK.
- In the Enable Scaling Group message, click OK.