nav-img
Advanced

Creating an AS Group Quickly

If you are using AS for the first time, following the wizard-based process is an easy way to create an AS group, AS configuration, and AS policy.

Prerequisites

  • You have created the required VPCs, subnets, security groups, and load balancers.
  • You have obtained the key pairs for logging in to the instances added by a scaling action if key authentication is used.

Procedure

  1. Log in to the management console.
  2. Under Computing, click Auto Scaling. In the navigation pane on the left, choose Instance Scaling.
  3. Click Create AS Group.
  4. Set basic information about the AS group, such as Name, Max. Instances, Min. Instances, and Expected Instances. Table 1 lists the parameters.

    Table 1 AS group parameters

    Parameter

    Description

    Example Value

    Region

    A region is where the AS group is deployed.

    Resources in different regions cannot communicate with each other over internal networks. For lower network latency and faster access to your resources, select the region nearest to your target users.

    N/A

    AZ

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

    • If you require high availability, buy servers in different AZs.
    • If you require low network latency, buy servers in the same AZ.

    N/A

    Multi-AZ Scaling Policy

    This parameter can be set to Balanced or Sequenced.

    • Balanced: When scaling out an AS group, the system preferentially distributes ECS instances evenly across 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 scaling out an AS group, the system distributes ECS instances to the AZs according to the order in which AZs are specified.
      NOTE:

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

    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

    Specifies the maximum number of ECS instances 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.

    The number of expected instances cannot be smaller than the minimum number of instances or greater than the maximum number of instances.

    0

    Min. Instances

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

    0

    AS Configuration

    Specifies the required AS configuration for the AS group. An AS configuration defines the specifications of the ECS instances 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 ECS instances.

    All ECS instances in the AS group are deployed in this VPC.

    N/A

    Subnet

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

    N/A

    Source/Destination Check

    Specifies whether the system checks the correctness of the source IP addresses contained in the packets sent by ECSs.

    • If this function is disabled, an ECS can process traffic not destined specially for it. Disable this function if the ECS functions as a SNAT server or has a virtual IP address bound.
    • If this function is enabled, the system checks whether source IP addresses contained in the packets sent by ECSs are correct. If the IP addresses are incorrect, the system does not allow the ECSs to send the packets. This prevents packet spoofing and improves system security.

    By default, this function is enabled.

    N/A

    Load Balancing

    This parameter is optional. A load balancer automatically distributes traffic across all instances in an AS group to balance their service load. It improves the fault tolerance of 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 unhealthy, AS will replace it with a new one.

    If you select Elastic 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

    Controls which instances are first to be removed during scale in. If specified conditions are met, scaling actions are triggered to remove instances. You can choose from any of the following instance removal policies:

    • Oldest instance created from oldest AS configuration: The oldest instance created from the oldest configuration is removed from the AS group first.
    • Newest instance created from oldest AS configuration: The newest instance created from 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:
    • During scale-in events, AS always attempts to maintain instance balance across AZs used by an AS group. Maintaining balance across AZs takes precedence over termination policies.
    • Manually added ECS instances are the last to be removed. If AS does remove a manually added instance, it only removes the instance from the AS group. It does not delete instance. If multiple manually added instances must be removed, AS preferentially removes the earliest-added instance first.

    Oldest instance created from oldest AS configuration

    EIP

    If EIP has been selected in the AS configuration of the AS group, an EIP is automatically bound to the ECS 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.

    N/A

    Data Disk

    If Data Disk is configured in the AS configuration used by the AS group, a data disk will be automatically created and attached to the ECS instances added during a scaling action to the AS group.

    If you select Release, the data disks attached to an instance will be deleted when the instance is removed from the AS group. Otherwise, the system detaches the data disks from the instance, but does not release them when the instance is removed from the AS group.

    N/A

    Health Check Method

    If an ECS instance fails a health check, AS replaces it with a new one. You can choose from either of the following health check methods:

    • ECS health check: checks ECS instance health status. If an instance is stopped or deleted, it is considered to be unhealthy. This method is selected by default. Using this method, the AS group periodically evaluates the running status of each instance based on the health check results. If the health check results show that an instance is unhealthy, AS removes the instance from the AS group.
    • ELB health check: determines ECS instance running status using a load balancing listener. This health check method is only available if a load balancer is configured for the AS group. An instance is considered to be healthy only when all associated listeners detect it as healthy. If a listener detects that the instance is unhealthy, AS removes the instance from the AS group.

    N/A

    Health Check Interval

    Specifies the length of time between health checks. You can set a health check interval, such as 10 seconds, 1 minute, 5 minutes, 15 minutes, 1 hour, or 3 hours, based on the service requirements.

    5 minutes

    Health Check Grace Period

    Specifies the amount of time until AS performs the first health check on new instances after they are put into service. The unit is second and value range is 0 to 86,400. 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 only available when ELB health check method is selected for the AS group.

    600s

    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 tags to manage your resources. 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 key must be specified.
      • The key must be unique to the AS group.
      • The key can include up to 36 characters. It cannot contain non-printable ASCII characters (0–31) or the following characters: =*<>\,|/
    • Value
      • The value is optional.
      • A key can have only one value.
      • The value can include up to 43 characters. It cannot contain non-printable ASCII characters (0–31) or the following characters: =*<>\,|/

    N/A

    Agency

    Optional. When your ECS resources created in the AS group need to be shared with other accounts, or need to be delegated to professional personnel or team for management, the tenant administrator creates an agency in IAM and grants the ECS management permissions to the personnel or team. The delegated account can log in to the cloud system and switch to your account to manage resources. You do not need to share security credentials such as passwords with the account, ensuring the security of your account.

    If you have created an agency in IAM, select the agency from the drop-down list.

    For more information about agencies, see Account Delegation.

    -

  5. After setting the parameters, click Create Now.
  6. (Optional) Add an AS policy.
    1. Locate the row containing the target AS group and click View AS Policy in the Operation column.
    2. (Optional) Click Add AS Policy to create an AS policy for the newly created AS group. For more details about AS policies, see Overview.