Manage and Operate Auto Scaling – Scaling Configuration

This topic provides examples on how to use Auto Scaling to scale ECS instances. Company A is used in this topic. The operations required to scale ECS instances vary based on different business scenarios. The following table describes the requirements and operations required in different business scenarios.

This topic describes how to create a scaling group and a scaling configuration.

YouTube player

Background information

To use Auto Scaling, you must create a scaling group at first. 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. After a scaling group is created, its cannot be changed. For more information, see Regions and zones.

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 1.

Step 1: Create a scaling group

In this example, a scaling group is created with simple settings. For more information about the parameters, see Use custom scaling configurations to create scaling groups.

  1. Log on to the Auto Scaling console.
  2. In the top navigation bar, select a region.
  3. Click Create Scaling Group.
  4. Set parameters for the scaling group.
  • Enter the name of the scaling group.In this example, enter MyFirstScalingGroup.
  • Set the maximum number of instances in the scaling group.In this example, enter 3.
  • Set the minimum number of instances in the scaling group.In this example, enter 1.
  • Set the cooldown time.In this example, enter 300.
  • Set the removal policy.A removal policy contains two levels of priorities. In this example, set the level-1 priority to Earliest Instance Created Using Scaling Configuration and the level-2 priority to Earliest Created Instance.
  • Select a configuration source for creating ECS instances in the scaling group.In this example, select Custom Scaling Configuration. If you select Launch Template, the scaling group can be enabled immediately after it is created. Make sure that a launch template is created in ECS in advance. For more information, see Use launch templates to create scaling groups.
  • Select a network type.In this example, select Classic. If you select , you can set the multi-zone scaling policy and reclaim mode to scale ECS instances more flexibly. However, you must create a Virtual Private Cloud (VPC) and a VSwitch in Alibaba Cloud VPC in advance. For more information, see Create a VPC and Create a VSwitch.

5. Click OK.

6. Click Create Later.Alternatively, click Create Now. You are redirected to the page for configuring basic settings of a scaling configuration, as described in Step 2: Create a scaling configuration and enable the scaling group.

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.

  1. Log on to the Auto Scaling console.
  2. In the top navigation bar, select a region.
  3. You can use either of the following methods to open the details page of a scaling group.
  • In the Scaling Group Name/ID column, click a scaling group name.
  • Click Manage in the Actions column corresponding to a scaling group.

4. In the left-side navigation pane, click Instance Configuration Source.

5. Click Create Scaling Configuration.

6. Complete basic configurations and click Next: System Configurations.

  • Select a billing method. In this example, select Pay-As-You-Go.
  • Select an instance type.In this example, select ecs.mn4.small, a balanced ECS instance type.
  • Select an image.In this example, select the public image 7.6 64-bit.
  • Set the space.In this example, select a 40 GiB ultra disk as the system disk but select no data disk.
  • Select a billing method and set the peak value for the public bandwidth.In this example, select the pay-by-traffic method and set the peak value to 1 Mbit/s.
  • Select a security group.

7. Complete the system configurations and click Next: Preview.In this example, select Set Later for Logon Credentials.

8. Enter the name of the scaling configuration and click Create.In this example, enter MyFirstScalingConfiguration.

9. Click Enable Configuration.

10. In the Apply Scaling Configuration dialog box that appears, click OK.

11. In the Enable Scaling Group dialog box that appears, click OK.

Result

The minimum number of ECS instances in the scaling group is 1. Therefore, Auto Scaling automatically creates an ECS instance for the scaling group after it is enabled. You can view the ECS instance in the ECS instance list. For more information, see Query ECS instances. The automatically created ECS instance applies configurations specified in the scaling configuration.

Read More: https://www.alibabacloud.com/help/doc-detail/25866.htm

Print Friendly, PDF & Email

Related posts:

Random posts:

%d bloggers like this: