Help Center> Auto Scaling> Getting Started> Scaling Your Website on a Schedule
None

Scaling Your Website on a Schedule

  • Assume that your e-Commerce website runs on ECS ecs-c9b4 in Huawei Cloud. You plan to launch a big promotion at 00:00 on a certain day. To respond to the demand spike during the activity, you can take the following measures: use Auto Scaling from Huawei Cloud to manage your website effectively for automatic scaling, and configure a scaling policy to automatically add two ECSs for your website at 23:30 on the day before the activity.

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. In the Specifications pane, select an ECS type. In this practice, General computing is selected. You can select multiple flavors to minimize the probability of scaling failures due to insufficient resources of a flavor.
2. Select an appropriate image for Image. In this practice, Private image is selected. You can use the service ECS ecs-c9b4 to create a private image, which will be used to create ECSs for processing services in scaling actions.
3. You can choose to encrypt disks to improve data security. However, the system disk will not be encrypted if the image is not encrypted.
4. Specify Login Mode. In this practice, Password is selected.
5. Advanced Settings is optional and is not configured in this practice.

1

Creating an AS configuration (1)

Apply for a VPC.

2

Creating an AS configuration (2)

Apply for a VPC.

View Image

Step 2: Create an AS Group

1. On the Instance Scaling page, click Create AS Group.
2. After configuring the parameters, click Create Now.

Note

1. When specifying AZ, ensure that the AZ where the service ECS resides is selected. Select Balanced for Multi-AZ Scaling Policy. When scaling out this AS group, the system preferentially distributes ECSs evenly across AZs used by the AS group.

2. Set Max. Instances to 10, Expected Instances to 0, and Min. Instances to 0.
3. Select the AS configuration you created for Configuration Template.
4. Select the VPC where the service ECS resides for VPC.
4. Select Elastic load balancer for Load Balancing. Access traffic will be automatically distributed to all available ECSs in the AS group.

1

Creating an AS group (1)

Apply for a VPC.

2

Creating an AS group (2)

Apply for a VPC.

View Image

Step 3: Add an AS Policy

1. On the AS Groups page, locate the created AS group, and click View AS Policy.
2. Select Scheduled for Policy Type.
3. Set Triggered On to 23:30 on the day before the activity.
4. Set Scaling Action to Add 2 instances.
5. Retain the default setting for Cooldown Period.
6. Click OK.

1

Adding a scheduled policy

Apply for a VPC.

View Image

Step 4: Confirm AS Group Specifications

1. On the Details page, confirm information about the AS group, AS configuration, and AS policy.
2. If you find anything incorrect, click Previous to correct it.
3. After confirming that all the information is correct, click Submit.

1

Confirming AS group specifications

Apply for a VPC.

View Image

Step 4: Manually Add Instances

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

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

Manually adding instances to an AS group

Apply for a VPC.

View Image

Step 5: View the Number of Instances

1. Before a scaling action is triggered, check that the AS group contains two ECSs and the expected number of instances is 2.

2. After a scaling action is triggered, check that the system automatically adds two ECSs to the AS group based on the configured policy. The AS group contains four ECSs and the expected number of instances is 4.

Through the scaling action, two ECSs are added to the AS group. Four ECSs process services, meeting the requirements in demand spikes.

1

Before a scaling action

Select the charging mode.

2

After a scaling action

选择实例配置

View Image

Operation Tutorials

helpcenter-videoicon Created with Sketch.

Creating an AS Group in Wizard-based Mode for Planned Expansion