Updated on 2022-02-22 GMT+08:00

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.

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 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

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

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

    0

    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.

    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.

    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 evenly distributed 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.

    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.

    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

    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

    Advanced Settings

    Configure notifications.

    You can select Do not configure or Configure now.

    N/A

    Notification

    Results of scaling actions are sent to you based on the functions provided by the Simple Message Notification (SMN) service.

    • Notification Conditions: When at least one of the following conditions is met, SMN sends a notification to you:
      • Instance creation succeeds
      • Instance removal succeeds
      • Errors occur in an AS group
      • Instance creation fails
      • Instance removal fails
    • Send Notification To: Select an existing topic. For details about how to create a topic, see Simple Message Notification User Guide.

    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

  5. Click Next.
  6. On the displayed page, you can use an existing AS configuration or create an AS configuration.
  7. Click Next.
  8. (Optional) Add an AS policy to an AS group.

    On the displayed page, click Add AS Policy.

    Configure the required parameters, such as the Policy Type, Scaling Action, and Cooldown Period.
    • 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. The default cooldown period is 300 seconds.
  9. Click Create Now.
  10. Check the AS group, AS configuration, and AS policy information. Click Submit.
  11. Confirm the creation result and go back to the AS Groups page as prompted.

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