Help Center > > Getting Started> Using AS to Dynamically Add ECSs
None

Using AS to Dynamically Add ECSs

Updated at: Sep 23, 2019 17:36
  • Auto Scaling (AS) automatically adjusts computing resources based on service requirements and configured policies.

  • You can specify AS configurations and policies based on service requirements. These configurations and policies free you from having to repeatedly adjust resources to keep up with service changes and demand spikes, and help you reduce the resources and manpower required.

  • An e-Commerce website runs on an ECS (ecs-c9b4) on HUAWEI CLOUD. The website plans to initiate a discount marketing campaign at 00:00 on a certain day. To respond to the demand spike during the campaign, the website can take the following measures:

Step 1: Create an AS Configuration

1. Log in to the management console.
2. Choose Service List > Computing > Auto Scaling.
3. Click Create AS Configuration.
4. Configure the parameters and click Create Now.

Note

1. Select Use specifications of an existing ECS for Configuration Template and select ECS ecs-c9b4.
2. Select Key pair or Password for Login Mode. Key pair is selected in the given example.
3. Advanced Settings is optional. You can configure file injection or user data injection.

1

Auto Scaling

Apply for a VPC.

2

Configuring AS configuration parameters

Apply for an ECS.

View Image

Step 2: Create an AS Group

1. On the Instance Scaling page, click Create AS Group.
2. Configure the parameters and click Next.

Note

1. Set Min. Instances and Expected Instances to 0 and Max. Instances to 10.
2. Select the AZ where ecs-c9b4 resides for AZ.
3. Select the VPC where ecs-c9b4 resides for VPC.
4. Select Elastic load balancer for Load Balancing. Access traffic will be automatically distributed to all ECSs in the AS group.
5. Select ECS health check or ELB health check for Health Check Method. ECS health check is selected in the given example.

1

Configuring AS group parameters (part 1)

Select the charging mode.

2

Configuring AS group parameters (part 2)

Select the charging mode.

View Image

Step 3: Add an AS Configuration

1. Select AS configuration as-config-ttvm for AS group as-group-9n8i.
2. Click Create Now.

Note

1. The preceding operations use Use existing as an example. You can also select Create to create an AS configuration.
2. After the AS group is created, you can change the AS configuration as you need.

1

Adding an AS configuration for an AS group

Select the charging mode.

View Image

Step 4: Add an AS Policy

1. On the AS Groups page, locate the created AS group and click View AS Policy.
2. Click Add to add an AS policy for AS group as-group-9n8i.

Note

You can also click the AS group name, click the AS Policies tab, and then click Add.

1

Viewing the AS policy

Select the charging mode.

2

Adding an AS policy

选择实例配置

View Image

Step 5: Configure AS Policy Parameters

1. Select Alarm for Policy Type.
2. Set Trigger Condition to CPU Usage Max. > 90%.
3. Set Scaling Action to Add 2 instances.
4. Retain the default value of Cooldown Period.
5. After configuring the parameters, click OK.

1

Configuring AS policy parameters

Select the charging mode.

View Image

Step 6: Manually Add Instances

1. Click the name of the target AS group and click the Instances tab.
2. Select the instances to be added and click Add.

Note

You can add instances to an AS group only if the AS group is enabled and has no ongoing scaling action, and the number of instances is less than the maximum number of instances.

1

Adding instances to an AS group

Select the charging mode.

View Image

Step 7: View Monitoring Data

View monitoring data of the scaling actions of AS group as-group-9n8i. The figure on the right suggests that:
1. The AS group contains no instance after it was created. After Expected Instances was changed to 2, a scaling action was triggered and two ECSs were added to the AS group.
2. The CPU usage stays stable.
AS monitors CPU status in real time and performs scaling actions based on the configured policy to meet service requirements and reduce costs.

1

Viewing monitoring data

Select the charging mode.

View Image

Operation Tutorials

helpcenter-videoicon Created with Sketch.

Creating Service-Requirements-based AS for planned Expansion

helpcenter-videoicon Created with Sketch.

Video Name Example

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel