Help Center> Auto Scaling> User Guide> AS Group> Creating an AS Group

Creating an AS Group

Scenarios

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.

Creating an AS group involves the configuration of the maximum, minimum, and expected numbers of instances and the associated load balancer.

Notes

ECS types supported by different AZs may vary.

  • 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 ECSs 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.
  • Before creating an AS group, you need to create the desired AS configuration.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner to select a region and a 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 Name, Max. Instances, Min. Instances, and Expected Instances. Table 1 describes the key AS group parameters.
    Table 1 AS group parameters

    Parameter

    Description

    Example Value

    Region

    A region is where an AS group resides.

    N/A

    AZ

    An AZ is a physical region where resources use independent power supply and networks. AZs are physically isolated but interconnected through an internal network.

    N/A

    Multi-AZ Extension Policy

    This parameter can be set to Load-balanced or Sequenced.

    • Load-balanced: When expanding ECSs in an AS group, the system preferentially distributes ECSs evenly among AZs used by the AS group. If it fails in the target AZ, it automatically selects another AZ based on the sequenced policy.
    • Sequenced: When expanding ECSs in an AS group, the system selects the target AZ based on the order in which AZs are selected.
      NOTE:

      This parameter needs to be configured when two or more AZs are selected.

    Load-balanced

    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 ECSs in an AS group.

    1

    Expected Instances

    Specifies the expected number of ECS instances in an AS group.

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

    0

    AS Configuration

    Specifies the required AS configuration for the AS group. An AS configuration defines the specifications of the ECSs to be added to an AS group. The specifications include the ECS image and system disk size. You need to create the required AS configuration before creating an AS group.

    N/A

    VPC

    Provides a network for your ECSs.

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

    N/A

    Subnet

    You can select a maximum of five subnets. The AS group automatically binds all NICs to the created ECSs. The first subnet is used by the primary NIC of the ECS by default, and other subnets are used by extension NICs of the ECS.

    Automatically-assigned IPv6 address: This parameter is available only if an AZ supporting IPv6 addresses is selected and IPv6 is enabled in the VPC subnet. For instructions about how to enable IPv6 on a subnet, see IPv4 and IPv6 Dual-Stack Network. By default, the system assigns IPv4 addresses. After Automatically-assigned IPv6 address is selected, the system assigns IPv6 addresses. In a VPC, an ECS uses an IPv6 address to access the dual-stack Intranet. To access the Internet, you need to enable the IPv6 bandwidth and select the shared bandwidth. In this case, ECSs can use the IPv6 address to access the Internet.

    NOTE:
    • IPv4 and IPv6 dual-stack is at open beta test only in the CN North-Beijing4 region and will be offered in other regions later.
    • Currently, only SN3 ECSs can use IPv6 addresses. To enable the IPv6 function for instances, select the SN3 ECS in the AS configuration.
    • Dedicated bandwidth is not supported.

    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 six 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.
    • Load balancing does not support the IPv4/IPv6 dual stack. If the IPv4/IPv6 dual stack is enabled for the AS group, the load balancer is still bound to the IPv4 address of the NIC.

    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 more information about load balancing, see Elastic Load Balance User Guide.

    N/A

    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 configuration is removed from the AS group first.
    • Newest instance created from oldest AS configuration: The latest instance created based on the oldest configuration is removed from the AS group first.
    • Oldest instance: The oldest instance is removed from the AS group first.
    • Newest instance: The latest instance is removed from the AS group first.
    NOTE:
    • Removing instances will preferentially ensure that the remaining instances are load balanced in AZs.
    • A manually added ECS is removed in the lowest priority. AS does not delete a manually added ECS when removing it. If multiple manually added ECSs must be removed, AS preferentially removes the earliest-added ECS.

    Oldest instance created from oldest AS configuration

    EIP

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

    N/A

    Health Check Method

    When a health check detects a faulty ECS, AS removes the faulty ECS 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 ECS based on the health check result. If the health check result shows that an ECS is faulty, AS removes the ECS from the AS group.
    • ELB health check: determines ECS running status using a load balancing listener. This health check method is available only when the AS group uses a load balancing listener. When a load balancing listener detects that an ECS is faulty, AS removes the ECS from the AS group.

    N/A

    Enterprise Project

    Specifies the enterprise project to which the AS group belongs. If an enterprise project is configured for an AS group, ECSs created in this AS group also belong to this enterprise project. If you do not specify an enterprise project, the default enterprise project will be used.

    NOTE:
    • Value default indicates the default enterprise project. Resources that are not allocated to any enterprise projects under your account are displayed in the default enterprise project.
    • Enterprise project is an upgraded version of IAM. It allocates and manages resources of different projects.

    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 allocated 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. It cannot contain the following characters: =*<>\,|/
    • Value
      • The value can be an empty character string.
      • A key can have only one value.
      • The value consists of at most 43 characters. It cannot contain the following characters: =*<>\,|/

    N/A

  6. After setting the parameters, click Create Now.
  7. (Optional) Click Add AS Policy to create an AS policy for the newly created AS group. For more details about AS policies, see Overview.