• Auto Scaling

as
  1. Help Center
  2. Auto Scaling
  3. User Guide
  4. Quick Start
  5. Creating an AS Group Quickly

Creating an AS Group Quickly

If you use AS for the first time, it is recommended that you follow the wizard-based process to create an AS group, AS configuration, and AS policy.

Notes

ECS types supported by different AZs may vary. When creating an AS group, you must choose a proper AS configuration according to the ECS type supported by the AZs used by the AS group.

  • If the ECS type specified in the AS configuration is supported by none of the AZs used by the AS group, the following situations will occur:
    • If the AS group is disabled, it cannot be enabled.
    • If the AS group is enabled, its status will become abnormal when instances are added to it.
  • If the ECS type specified in the AS configuration is supported only by certain AZs used by the AS group, the instances added by a scaling action are distributed only in the AZs supporting the ECS type. As a result, the instances in the AS group may not be evenly distributed.

Prerequisites

  • You have created the required VPCs, subnets, security groups, and load balancers.
  • You have obtained the keys for logging in to the instances added by a scaling action.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. Under Computing, click Auto Scaling. In the navigation pane on the left, choose Instance Scaling.
  4. Click Create AS Group.
  5. Set basic information about the AS group, such as Name, Max. Instances, Min. Instances, and Expected Instances. Table 1 describes the key AS group parameters.
    Table 1 Key AS group parameters

    Parameter

    Description

    Example Value

    Region

    Specifies the region where the AS group resides.

    -

    Name

    Specifies the name of the AS group to be created.

    The name contains 1 to 64 characters and consists of only letters, digits, underscores (_), and hyphens (-).

    N/A

    Max. Instances or Min. Instances

    Specifies the maximum or minimum number of instances in an AS group.

    10 or 5

    Expected Instances

    Expected Instances is the expected number of instances in an AS group.

    After an AS group is created, you can change this value, which will trigger a scaling action.

    6

    AZ

    A physical region where resources use independent power supplies and networks. AZs are physically isolated but interconnected through an internal network. To enhance application availability, the system evenly distributes your instances between AZs if multiple AZs have been selected.

    N/A

    VPC

    Provides a network for your instances.

    All instances in an AS group belong to the same VPC.

    N/A

    Subnet

    By default, only the instances in the same VPC subnet can communicate with each other.

    If you select multiple subnets, the system binds multiple NICs to an instance that is automatically added by the scaling action to the AS group. The first NIC you selected works as the primary NIC, and the remaining NICs as extended ones. You can select up to five subnets.

    N/A

    Load Balancing

    This parameter is optional. A load balancer automatically distributes access traffic to all instances in an AS group to balance their service load. It enables higher levels of fault tolerance in your applications and expands application service capabilities.

    NOTE:
    • Up to three load balancers can be added to an AS group.
    • After multiple load balancers are added to an AS group, multiple services can be concurrently listened to, thereby improving service scalability. If ELB health check is selected for Health Check Method, when any one of the listeners detects that an instance becomes faulty, AS will replace the faulty instance with a functional one.

    If you select Classic load balancer, configure the following parameters:

    • Load Balancer
    • Listener
    If you select Enhanced load balancer, configure the following parameters:
    • Load Balancer
    • Backend ECS Group
    • Backend Port: specifies the port on which a backend ECS listens for traffic.
    • Weight: determines the portion of requests a backend ECS processes compared to other backend ECSs added to the same listener.

      For details about ELB, see Elastic Load Balancing User Guide.

    N/A

    Health Check Method

    When a health check detects a faulty instance, AS removes the faulty instance from the AS group and adds a new one. The health check is implemented using any of the following methods:

    • ECS health check: checks ECS running status. If an ECS is stopped or deleted, it is considered as abnormal. This method is selected by default. Using this method, the AS group periodically determines the running status of each instance based on the health check result. If the health check result shows that an instance is faulty, AS removes the instance from the AS group.
    • ELB health check: determines ECS running status using a load balancing listener. This health check method is available when the AS group uses a load balancing listener. When a load balancing listener detects that an instance is faulty, AS removes the instance from the AS group.

    N/A

    Health Check Interval

    Specifies the health check period for an AS group. You can set a proper health check interval, such as 10 seconds, 1 minute, 5 minutes, 15 minutes, 1 hour, and 3 hours based on the site requirements.

    5 minutes

    Health Check Grace Period

    Specifies the grace period for instance health check. The unit is second and value range is 0 to 86400. The default value is 600.

    The health check grace period starts after an instance is added to an AS group and enabled. The AS group will start checking status of the instance only after the grace period ends.

    This parameter is available only when ELB health check mode is selected for the AS group.

    600s

    Instance Removal Policy

    Specifies the priority for removing instances from an AS group. If specified conditions are met, scaling actions are triggered to remove instances. AS supports the following instance removal policies:

    • Oldest instance created from oldest AS configuration: The oldest instance created based on the oldest AS configuration will be preferentially removed from the AS group.
    • Newest instance created from oldest AS configuration: The latest instance created based on the oldest AS configuration will be preferentially removed from the AS group.
    • Oldest instance: The oldest instance will be preferentially removed from the AS group.
    • Newest instance: The latest instance will be preferentially removed from the AS group.
    NOTE:
    • Removing instances will preferentially ensure that the remaining instances are evenly distributed in AZs.
    • A manually added instance is removed in the lowest priority. AS does not delete a manually added instance when removing it. If multiple manually added instances must be removed, AS preferentially removes the earliest-added instance.

    N/A

    EIP

    If EIP has been selected in an AS configuration for an AS group, an EIP is automatically bound to the instance added by a scaling action to the AS group. If you select Release, the EIP bound to an instance is released when the instance is removed from the AS group. Otherwise, the system unbinds the EIP from the instance but does not release it when the instance is removed from the AS group.

    -

    Advanced Settings

    Configure notifications and tags.

    You can select Do not configure or Configure now.

    -

    Notification Mode

    This parameter is optional. If this parameter is selected, the system will notify you of scaling action results by email after a scaling action is complete.

    The mailbox is specified when you register yourself on the cloud.

    N/A

    Tag

    If you have many resources of the same type, you can use a tag to manage resources flexibly. You can identify specified resources quickly using the tags added to them.

    Each tag contains a key and a value. You can specify the key and value for each tag.

    • Key
      • The value cannot be empty.
      • An AS group has a unique key.
      • The value consists of at most 36 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    • Value
      • The value can be an empty character string.
      • A key can have only one value.
      • The value consists of at most 43 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.

    -

  6. Click Next.
  7. On the Add AS Configuration page, you can select Use Existing or Create. For details, see sections Using an Existing ECS to Create an AS Configuration and Using a New Specifications Template to Create an AS Configuration.
  8. Click Next.
  9. (Optional) Add an AS policy to an AS group.

    On the AS Policy tab, click Add AS Policy.

    Configure the required parameters, such as the Policy Type, Scaling Action, and Cooldown Period. For details, see sections Dynamically Expanding Resources and Expanding Resources as Planned.
    NOTE:
    • If a scaling action is triggered by an AS policy, the cooldown period is that which is configured for that AS policy.
    • If a scaling action is triggered by manually changing the expected number of instances or by other actions, the cooldown period is that which is configured for the AS group.
  10. Click Create Now.
  11. Check the AS group, AS configuration, and AS policy information. Click Submit.
  12. Confirm the creation results and switch back to the AS Groups page as prompted.

    After the AS group is created, its status changes to Enabled.