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

AS Advantages

AS automatically adjusts service resources to keep up with your demand based on pre-configured AS policies. It has the advantages of automatic resource adjustment, reduced cost, improved availability and high fault tolerance. AS applies to the following scenarios:

  • Heavy-traffic forum: Service load changes of a heavy-traffic forum website are difficult to predict. AS dynamically adjusts the number of ECSs based on monitored ECS metrics, such as vCPU Usage and Memory Usage.
  • E-commerce: During large-scale promotions, E-commerce websites need more resources. AS automatically increases ECSs and bandwidth to ensure that promotions go smoothly.
  • Live streaming: A live streaming website broadcasts popular programs from 14:00 to 16:00 every day. AS automatically increases ECSs and bandwidth during this period to ensure a smooth viewer experience.

Automatic Resource Adjustment

AS adds instances and increases bandwidth for your applications when the access volume increases and reduces extra resources from the system when the access volume drops, ensuring stable system running.

  • Scaling ECSs on Demand

    AS adjusts resources for an application system based on demand, thereby enhancing cost management. Resources are adjusted in the following ways:

    • Dynamic resource adjustment

      AS adjusts resources when an alarm policy is triggered. For details, see Dynamically Expanding Resources.

    • Planned resource adjustment

      AS adjusts resources when a periodic or scheduled policy is triggered. For details, see Expanding Resources as Planned.

    • Manual resource adjustment

      Resources are adjusted if you manually change the expected number of instances, or add instances to or remove instances from an AS group. For details, see Manually Expanding Resources.

    Consider a train ticket-buying web application running on the public cloud. The load of the application is relatively low during Q2 and Q3 because there aren't many travelers, but is relatively high during Q1 and Q4. The common solution is to provision servers according to the maximum or average load of the application of the application, as shown in Figure 1 and Figure 2. However, these two solutions may waste resources or cannot meet demand during peak seasons. After you enable AS for the application, AS automatically adjusts the number of servers to keep up with changes in demand. This allows the application to maintain steady, predictable performance at optimal costs, as shown in Figure 3.

    Figure 1 Over-provisioned servers
    Figure 2 Insufficient servers
    Figure 3 Auto-scaled capacity
  • Scaling Bandwidth on Demand

    AS adjusts bandwidth for an application system based on demand, reducing bandwidth costs.

    You can select the following scaling policies to adjust the IP bandwidth on demand:

    • Alarm Policy

      You can set the alarm triggering conditions such as outbound traffic and bandwidth. When the system detects that the triggering conditions are met, the system automatically adjusts the bandwidth.

    • Scheduled Policy

      The system can automatically increase, decrease, or adjust the bandwidth to a fixed value at a fixed time according to the scheduled policy.

    • Periodic Policy

      The system can periodically adjust the bandwidth based on the periodic policy, reducing the workload of manually setting the bandwidth.

    The following uses the alarm policy as an example.

    Service load changes of a live streaming website in different time periods are difficult to predict. The bandwidth needs to be dynamically adjusted between 10 Mbit/s and 30 Mbit/s based on metrics such as outbound traffic and inbound traffic. AS can automatically adjust the bandwidth to meet requirements. You only need to select the target EIP and create two alarm policies. One policy is to add 2 Mbit/s when the outbound traffic is greater than xxx bytes, with the limit set to 30 Mbit/s. The other policy is to reduce 2 Mbit/s when the outbound traffic is less than xxx bytes, with the limit set to 10 Mbit/s.

  • Evenly Distributing Instances by AZ

    Instances are evenly distributed in different AZs to reduce the impact of power and network outage on system stability.

    A region is a geographic area where resources used by your ECSs are located. Each region contains multiple AZs where resources use independent power supplies and networks. AZs are physically isolated from one another but interconnected through an intranet. Each AZ provides cost-effective and low-latency network connections that are unaffected by faults in other AZs.

    An AS group can contain ECS instances from one or more AZs in a region. To adjust resources, AS evenly distributes ECS instances across AZs based on the following rules:

    Evenly distributing new instances to balanced AZs

    AS can evenly distribute ECS instances among the AZs used by an AS group. To do it, AS moves new instances to the AZs with the fewest instances.

    For example, four instances are evenly distributed in two AZs used by an AS group. If a scaling action is triggered to add four more instances to the AS group, AS adds two to each AZ.

    Figure 4 Evenly distributing instances

    Re-balancing instances in unbalanced AZs

    The load of AZs may become unbalanced if you manually add or remove instances in an AS group. The next scaling action will preferentially re-balance the instances in the AZs.

    For example, three instances are distributed in AZ 1 and AZ 2 used by an AS group, two in AZ 1 and one in AZ 2. If a scaling action is triggered to add five more instances to the AS group, AS adds two to AZ 1 and three to AZ 2.

    Figure 5 Re-balancing instances

Enhanced Cost Management

AS enables you to use instances and bandwidth on demand by automatically adjusting resources in the system, eliminating waste of resources and reducing costs.

Improved Availability

AS ensures proper resources for applications. Working with ELB, AS automatically associates a load balancing listener with any ECS instances newly added to the AS group and balances access traffic on all the instances of an AS group through the listener.

Using ELB with AS

Working with ELB, AS automatically increases or decreases ECS instances based on changes in demand while ensuring that the load of all instances is balanced in the AS group.

After ELB is enabled in an AS group, AS automatically associates a load balancing listener with any instances newly added to the AS group. Then, ELB automatically distributes access traffic to all instances in the AS group through the listener, improving system availability. If the instances in the AS group are running various types of applications, you can bind multiple load balancing listeners to the AS group to listen to each of these applications, improving service scalability.

High Fault Tolerance

AS monitors instance status in an AS group. After detecting an unhealthy instance, AS replaces it with a new one.