This topic describes how to create scaling configurations for scaling groups that contain Elastic Compute Service (ECS) instances. A scaling configuration is a template that is used by Auto Scaling to create ECS instances in a scaling group after Auto Scaling triggers scale-out activities based on your configurations, such as scheduled tasks.
- A scaling group of the ECS type is created. If you select Intelligent Configuration as the instance configuration mode and you do not configure the Instance Type parameter when you create a scaling configuration for a scaling group, make sure that the scaling group resides in a virtual private cloud (VPC). For more information, see Manage scaling groups.
- A security group is created. If your scaling group resides in a VPC, make sure that the security group and the scaling group are in the same VPC. For more information, see Create a security group.
- Log on to the Auto Scaling console.
- In the left-side navigation pane, click Scaling Groups.
- In the top navigation bar, select a region.
- Find a scaling group and go to the details page of the scaling group. You can use
one of the following methods to go to the details page:
- Click the ID of the scaling group in the Scaling Group Name/ID column.
- Click Details in the Actions column of the scaling group.
- In the upper part of the page, click the Instance Configuration Sources 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 Valid values:
- 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 fluctuates based on the supply and demand of 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 Configuration Mode Different instance types are provided to meet various business requirements. Auto Scaling provides the following instance configuration modes:
- Instance Type: You can specify multiple instance types. If an instance type does not have sufficient
inventory, Auto Scaling evaluates the instance types that you specified and creates
instances of the instance type that has sufficient inventory. This helps increase
the success rate of scale-out activities.
Note You can configure 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.
By default, Enable Unlimited Mode for Burstable Instances is not selected for burstable instances. You can select Enable Unlimited Mode for Burstable Instances based on your business requirements. For more information about burstable instances, see Overview.
- Intelligent Configuration: If you select Intelligent Configuration, Auto Scaling selects the instance type with the lowest price based on your configurations. You need to only specify the number of vCPUs, memory size, instance family, and maximum price. This facilitates more intelligent and efficient scale-out activities. Intelligent Configuration can be applied only to scaling groups that reside in VPCs. Intelligent Configuration reduces the risk of a scale-out failure due to insufficient inventory of instance types.
Auto Scaling allows you to configure Intelligent Configuration and Instance Type at the same time. If you configure both modes, you cannot configure weights for instance types. In this case, Auto Scaling uses the instance types that you specified for the Instance Type parameter to execute scaling activities. If the instance type that you specified does not have sufficient resources, Auto Scaling uses the instance type that is matched by using the Intelligent Configuration parameter and has the lowest price to create ECS instances.
Overview of instance families Image An image can provide the data, such as the system and application environments and related software configurations, that is required to create ECS instances. Valid values:
- Public Image: Public images are the basic system images provided by Alibaba Cloud or its third-party partners and contain only initial system environments. Configure the application environment or related software based on your business requirements. For more information, see Overview.
- Custom Image: Custom images are the images that are created from existing instances or snapshots
and contain initial system environments, application environments, and related software
configurations. A custom image can be used to reduce the time required to create ECS
instances. For more information, see Overview.
- 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 images in scaling configurations.
- You can create an image update task in the Auto Scaling console. When the task is executed, Auto Scaling creates a custom image from the source instance, and then replaces the current image in the scaling configuration with the new image. For more information, see Automatically update images in scaling configurations.
- Shared Image: Shared images are the images that are shared with you by other accounts. Alibaba Cloud cannot ensure the security and integrity of shared images. For more information, see Share a custom image.
- Marketplace Image: Alibaba Cloud Marketplace provides images that are pre-installed with OSs, application environments, and various software. Alibaba Cloud Marketplace images are reviewed by Alibaba Cloud to ensure quality and stability. You can use these images to create ECS instances in just a few clicks without the need for additional configurations. You can use these images in scenarios such as website creation, application development, and visualized management. For more information, see Alibaba Cloud Marketplace images.
Image overview Storage Select a system disk or one or more data disks for ECS instances to store data.
- System Disk: You can select Enhanced SSD (ESSD), Standard SSD, Ultra Disk, or ESSD AutoPL.
- Data Disk: You can configure the size and number of data disks based on your business requirements.
- To add data disks, click Add Disk or the icon and then configure the size and number of data disks. To create a data disk from a snapshot, click Create from Snapshot and then select a snapshot.
- To delete a data disk, click the icon to the left side of the data disk in the Data Disk section.
If the disk category that you configured is not supported by the instance type or the zone that you selected, the scale-out activity may fail. To improve the success rate of the scale-out activity, you can configure multiple categories for system disks or data disks, such as basic disks, standard SSDs, ultra disks, ESSDs, and ESSD AutoPLs. After you configure multiple disk categories, Auto Scaling selects the disk category that is supported by the instance type or the zone that you selected based on the configured order to create ECS instances.
Elastic Block Storage devices Public IP Address You can assign IPv4 addresses to ECS instances to connect the instances to the Internet. If you select Assign Public IP Address, you must specify a billing method for public bandwidth. Security Group A security group is a virtual firewall that controls access to ECS instances.
- In the System Configurations (Optional) step, configure the parameters and click Next: Preview. The following table describes the parameters.
Parameter Description References Tag You can use tags to identify resources. For example, you can use tags to categorize ECS instances and related resources by purpose. This way, you can search for and filter resources in a more efficient manner. Resource Group Resource groups allow you to categorize your resources by purpose, permission, or region. This way, you can manage the resources across accounts and projects in a more efficient manner. Resource groups Logon Credentials The supported logon credentials vary based on the OS type.
- Linux: You can select an SSH key pair when you create a scaling configuration. You can also configure logon credentials after you create ECS instances.
- Windows: You can configure logon credentials only after you create ECS instances.
Instance Name This parameter specifies the name of the ECS instance. If you do not configure this parameter, the default name is used. N/A Host This parameter specifies the hostname of the ECS instance. If you do not configure this parameter, the default name is used. Set rules for generating sequential and unique hostnames RAM Role You can bind 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 the RAM roles.Note You can select RAM roles only for scaling configurations in scaling groups that reside in VPCs. User Data You can use user data to configure the startup behavior of an ECS instance or pass data to the ECS instance 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 User Data feature.Note You can configure the User Data feature only for scaling configurations in scaling groups that reside in VPCs. Private Pool You can use this parameter to ensure 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 capacity for a specific number of instances that have specific attributes. Valid values:
- Open: Auto Scaling uses the resources that are allocated to open private pools. If all resources in the open private pools are used, Auto Scaling uses the resources that are allocated to public pools.
- Do Not Use: Auto Scaling uses the resources that are allocated to public pools instead of the resources that are allocated to the private pools to create instances.
- Target: Auto Scaling uses the resources that are allocated to a specific private pool or an open private pool to create instances. If all resources that are allocated to the specific private pool are used, 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.
- In the Preview step, check your configurations, specify a name for the scaling configuration, and then click Create.
- In the Created dialog box, click Enable Configuration.