edit-icon download-icon

Auto scaling

Last Updated: Feb 01, 2019

To ensure the service quality and availability of an EDAS distributed cluster, it is crucial to introduce O&M capabilities that can detect the status of each server in the cluster and can scale the cluster in or out in real time based on the system load.

If the ECS instances in your cluster are insufficient for scale-out, use the Alibaba Cloud Auto Scaling feature to create hosts (you must use EDAS to activate Alibaba Cloud Auto Scaling in advance). You are charged in pay-as-you-go mode for hosts created through elastic resources.

EDAS provides the auto scaling function to automatically scale up or down a cluster based on the CPU, RT, and load metrics of the cluster servers.

Metric descriptions:

  • CPU: CPU usage of the server in percentage. If multiple servers exist in the application, the average value of all servers is used.
  • RT: Time for the system to respond to a request in ms.
  • Load: System load, which is a positive integer.

These metrics must be positive integers without floating-point numbers. If multiple servers exist in the application, the average values of all servers are used for all the preceding metrics.Auto scaling includes automatic scale-in and scale-out, for which the rules can be configured separately.

Automatic scale-out

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications. On the Applications page, click the name of the target application.

  3. On the Application Details page, click Auto Scaling in the left-side navigation pane.

  4. Click the switch to the right of Scale-out Rule to enable scale-out rules.

  5. Configure the scale-out rule parameters, and then click Save.

    • Instance Source (for applications other than Docker)

      • Existing Resources: uses only the idle hosts in the cluster for automatic scale-out.

      • Elastic Resources: uses only the hosts created by Auto Scaling for automatic scale-out.

      • Existing Resources First: uses the idle hosts in the cluster first for automatic scale-out. If the cluster does not have sufficient idle hosts, the hosts created with elastic resources are used.

      Note: If you select Elastic Resources or Existing Resources First, the hosts created by Alibaba Cloud Auto Scaling may be used, and in this case you are charged in pay-as-you-go mode.

      In addition, you need to set the following parameters for the hosts created with elastic resources:

    • Specifications Template: uses one of the existing hosts in the cluster as a template for automatic scale-out. Based on the template, new hosts inherit the CPU, memory, network, disk, and security group settings.
    • Network Type and Multi-Zone Scaling Policy: Network Type indicates the network where the current application to be scaled out is located and cannot be changed.If the current network is Virtual Private Cloud (VPC), you must specify one or more virtual switches for the new host. If you specify two or more virtual switches, EDAS automatically allocates these switches through the Multi-Zone Scaling Policy.
    • Login Password: This password is used as the administrator (root user) password for a new host.

    • Trigger Indicators: includes the thresholds of CPU, RT, and Load indicators.Scale-out is triggered when a threshold is exceeded.

    • Trigger Condition

      • Any Metric: Automatic scale-up is implemented if any of the set metrics is triggered.

      • All Metrics: Automatic scale-up is implemented only when all of the set metrics are triggered.

    • Lasts for More Than: indicates the duration for which the indicators are triggered continuously, in minutes.Within the duration, if the average value of an indicator per minute continuously reaches the set threshold, scale-out is triggered. You can configure the duration based on the sensitivity of the cluster service capabilities.

    • Number of Instances for Each Scale-Out: indicates the number of servers automatically added upon each scale-out. You can set this parameter based on the service capabilities of a single server of the application.

    • Maximum Number of Instances: When the number of ECS instances in the cluster reaches the maximum, no more scale-out can be performed. You can set this parameter based on the resource quota.

Automatic scale-in

The Automatic Scale-In configuration process is similar to the Automatic Scale-Out configuration. For the definitions and configuration methods of the metrics, see Automatic scale-out.

Note:

  • When you configure both scale-out and scale-in rules, the metrics of the scale-in rules cannot be greater than those of scale-out rules. Otherwise, an error message will be displayed when you click Save.
  • If elastic resources are used, the hosts created with elastic resources are released first during scale-in.

View auto scaling results

After auto scaling rules have been set, when an automatic scale-in or scale-out is performed, you can check whether the number of ECS instances has changed in Instance Information on the Basic Information page.

Thank you! We've received your feedback.