as
  1. Help Center
  2. AS Management
  3. AS Groups
  4. 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. Under Computing, click Auto Scaling.
  3. Click Create AS Group.
  4. 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

    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

    Cooldown Period

    Specifies a period of time after each scaling action is complete. During the cooldown period, scaling actions triggered by alarms will be denied. Scheduled and periodic scaling actions are not restricted.

    NOTE:
    • If a scaling action is triggered by an AS policy, the cooling duration 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 cooling duration is that which is configured for the AS group.

    300s

    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

    Security Group

    Controls instance access within or between security groups by defining access rules. This enhances instance security.

    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.

    When using ULB, configure the following parameters:
    • Load Balancer
    • Listener
    • 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 more information about ELB, see Elastic Load Balance 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

    Release EIP on Instance Removal

    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 the check box before Yes, the EIP bound to the 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.

    N/A

  5. 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.
  6. Click Create Now.
  7. Check the AS group and AS configuration information. Click Submit.
  8. You can add AS policies. For details, see section Managing Scaling Policies.
  9. (Optional) Configure notification for the AS group. For details, see section Configuring Notification for an AS Group.
  10. (Optional) Add a tag to the AS group. For details, see section Marking AS Groups and ECSs.