Help Center/ Auto Scaling/ Getting Started/ Creating an AS Group Quickly
Updated on 2024-10-12 GMT+08:00

Creating an AS Group Quickly

Scenarios

Auto Scaling (AS) automatically adjusts resources based on your service requirements and preset AS policies, helping you save resources and labor costs.

AS is available for free, but you pay for the instances (cloud servers) automatically added to the AS group and the resources used by the instances, such as EIPs, disks, and images.

This section walks you through the process of creating an AS configuration and an AS group, which are two critical steps for using AS.

Procedure

Step

Description

Step 1: Create an AS Configuration

Specify the specifications, image, and disk settings for the instances that AS creates for you.

Step 2: Create an AS Group

Configure scaling limits for the AS group by specifying the maximum, minimum, and desired group size.

Step 3: Create an AS Policy

Create an AS policy to adjust service resources.

Step 1: Create an AS Configuration

In this step, you create an AS configuration using the example settings. For details about how to create an AS configuration, see Creating an AS Configuration.

  1. Log in to the console and go to the Create AS Configuration page.
  2. Configure the AS configuration settings.
    Figure 1 Page for creating an AS configuration


    Table 1 Parameters for creating an AS configuration

    Parameter

    Example

    Description

    Billing Mode

    Pay-per-use

    Resources will be billed based on the usage duration. You can provision or delete resources at any time. For details, see ECS Billing Overview.

    Region

    CN-Hong Kong

    For low network latency and quick resource access, select the region nearest to your target users.

    For details, see Region and AZ.

    Name

    as-config-3817

    Enter a name for the AS configuration.

    Configuration Template

    Create new template

    Specify the specifications, image, and disk settings for the instances AS creates.

    CPU Architecture

    x86

    x86 uses Complex Instruction Set Computing (CISC).

    Specifications

    s7n.xlarge.2

    Select a flavor one based on service requirements. For more information, see A Summary List of x86 ECS Specifications.

    Image

    CentOS 8.2 64bit (40 GiB)

    The example is a free public Linux image provided by Huawei Cloud.

    Disk

    General Purpose SSD, 100 GiB

    Specify the specifications of the system disk for instances AS creates.

    Security Group

    default

    Use the default security group.

    EIP

    Do not use

    If the instances in the AS group need to access the Internet, you can configure EIPs for the instances.

    Login Mode

    Key pair

    A key pair for logging in to instances.

    Key Pair

    KeyPair-2325

    Use an existing or create a new key pair. Ensure that you have obtained the private key.

    Advanced Settings

    Do not configure

    -

  3. Click Create Now.
  4. Click Back to AS Configuration List to view the created AS configuration.
    Figure 2 Viewing the AS configuration

Step 2: Create an AS Group

In this step, you create an AS group using the example settings. For details about how to create an AS group, see AS Groups.

  1. Log in to the console and go to the Create AS Group page.
  2. Configure the AS group settings.
    Figure 3 Page for creating an AS group


    Table 2 Parameters for creating an AS group

    Parameter

    Example

    Description

    Region

    CN-Hong Kong

    For low network latency and quick resource access, select the region nearest to your target users.

    For details, see Region and AZ.

    AZ

    AZ1, AZ2, AZ3, AZ7

    AZs are physically isolated but interconnected over a high-speed intranet.

    Multi-AZ Scaling Policy

    Balanced

    This policy ensures that the number of instances in each of the selected AZs is balanced.

    Name

    as-group-test1

    Enter a name for the AS group.

    Max. Instances

    1

    Specify the maximum group size.

    Expected Instances

    0

    Specify the desired initial group size.

    Min. Instances

    0

    Specify the minimum group size.

    AS Configuration

    as-config-3817

    Select the AS configuration created in step 1.

    VPC

    vpc-default-smb

    Use the default VPC and subnet.

    For details, see VPC and Subnet Planning.

    Subnet

    subnet-default-smb

    Load Balancing

    Do not use

    This parameter is optional. For details, see Adding a Load Balancer to an AS Group.

    Instance Removal Policy

    Oldest instance created from oldest AS configuration

    With this policy, instances that use the oldest AS configuration are removed from the AS group first.

    EIP

    Release

    With this option, when an instance is removed from an AS group, its EIP will be released.

    Data Disk

    Delete

    With this option, when the instance is removed from the AS group, all data disks attached to the instance will be deleted

    Health Check Method

    ECS health check

    With this method, AS checks whether instances are running. If an instance fails the health check, AS removes it from the AS group.

    Health Check Interval

    5 minutes

    Specify the interval between health checks.

    Health Check Grace Period (s)

    600

    Specify how long AS must wait before checking the health status of an instance.

    Enterprise Project

    default

    Specify the enterprise project where the AS group is managed. Instances in this AS group are also managed under the same project.

  3. Click Create Now.
  4. Click Back to AS Group List to view the created AS group.
    Figure 4 Viewing the AS group

Step 3: Create an AS Policy

In this step, you create AS scaling policies to adjust service resources.

Operation Type

Refer To

Dynamic scaling

Scaling Your Website Dynamically

Scheduled scaling

Scaling Your Website on a Schedule