• Auto Scaling

as
  1. Help Center
  2. Auto Scaling
  3. User Guide
  4. AS Management
  5. AS Groups
  6. Creating an AS group

Creating an AS group

An AS group consists of a collection of instances and AS policies that have similar attributes and apply to the same application scenario. An AS group is the basis for enabling or disabling AS policies and performing scaling actions. The pre-configured AS policy automatically adds or deletes instances to or from an AS group, or maintains a fixed number of instances in an AS group.

When creating an AS group, add an AS configuration and policy to it. For details, see section Creating an AS Group Quickly. Alternatively, you can manually add an AS policy to an AS group.

The basic information about an AS group to be created includes the maximum, minimum, and expected numbers of instances and the associated ELB service.

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 parameters, such as NameMax. InstancesMin. Instances, and Expected InstancesTable 1 describes the key parameters to be configured.
    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. On the Add AS Configuration page, you can choose to use an existing AS configuration or create one. For details, see Using an Existing ECS to Create an AS Configuration and Using a New Specifications Template to Create an AS Configuration.
  7. Click Create Now.
  8. Check the AS group and AS configuration information. Click Submit.
  9. You can add AS policies. For details, see section Managing Scaling Policies.