Auto scaling is an important O&M capability for distributed application management. The auto scaling feature provided by EDAS perceives the status of each instance for an application and accordingly implements dynamic scaling. This ensures the quality of service (QoS) and improves application availability.

Why is auto scaling used?

Applications such as Internet and game applications are prone to sudden traffic floods during promotional activities. The imbalance between SLA and resource costs causes issues such as system response latency and system breakdown. EDAS inherits the traffic flood management technology used by Alibaba to cope with Double 11. This provides second-level auto scaling to reduce instance retention costs and ensure SLA. Auto scaling is applicable to industries such as the Internet, games, and social networking platforms.

Metric-based scaling

EDAS monitors the CPU utilization and the memory usage of your applications, and automatically scales your application instances out or in by using auto scaling policies.

Notice
  • You can configure only one metric-based scaling policy in a single application.
  • When a scaling policy is enabled, do not manage the lifecycle of an EDAS application. Disable the policy and manage the lifecycle.
  • You cannot add an auto scaling policy when you perform application changes, such as application deployment, application scaling, and specification changes.
  1. Log on to the EDAS console.
  2. In the left-side navigation pane, click Applications. In the top navigation bar, select a region. In the upper part of the page, select a namespace. On the Applications page, click the name of the desired application.
  3. On the Application Details page, click the Instance Deployment Information tab and click the Auto Scaling collapse panel. After the collapse panel is expanded, click Add Flexible Strategy.
  4. On the Adding a flexible policy panel on the right side, configure auto scaling rules and click OK.
    • Strategy Name: the name of the auto scaling policy. The name must start with a lowercase letter and can contain lowercase letters, digits, and hyphens (-). The name must be 1 to 32 characters in length.
    • Strategy Type: Only metric-based scaling policies are supported and scheduled scaling policies will be supported.
    • Triggering Conditions: supports CPU Usage and Mem Usage.
    • Maximum number of application instances: specifies the specified number of instances that can be scaled out when the auto scaling conditions are triggered.
    • Minimum number of application instances: specifies the specified number of instances that can be scaled in when the auto scaling conditions are triggered.
    Note
    • Assume that CPU Usage or Mem Usage is selected. If the CPU utilization or memory usage of the current application is at least the preset value, the application is scaled out and the specified number of application instances cannot exceed the value of Maximum number of application instances. Otherwise, the application is scaled in and the specified number of the application instances cannot be smaller than the value of Minimum number of application instances.
    • Assume that both CPU Usage and Mem Usage are selected. If both values are at least the preset values, the application is scaled out and the specified number of the application instances cannot exceed the value of Maximum number of application instances. Otherwise, the application is scaled in and the specified number of the application instances cannot be smaller than the value of Minimum number of application instances.

    The values of Maximum number of application instances and Minimum number of application instances are calculated by using the following formula: Specified number of instances = Current number of instances × (Current metric value/Expected metric value)

  5. On the right side of Monitoring indicator strategy list, click Enable in the Operation column.
    If EDAS scales out or in application instances by using the specified auto scaling policy after the policy is triggered, the auto scaling is successful.
  6. In the dialog box that appears, specify (Single Pod) CPU core number and (Single Pod) Memory (MB) and click OK.

Verify the result

After the auto scaling policy is enabled, EDAS automatically scales out or in application instances by using the policy. You can perform the following steps to view the detailed scaling event records.

  1. On the right side of Monitoring indicator strategy list, click Event.
  2. On the Application Event page, view the detailed scaling events.
    On this page, you can specify the Source Type, Source Name, Cause of Event, and Event Level parameters to search for events and view detailed records.

References

After an auto scaling policy is enabled, you can delete, disable, enable, and edit the policy and manage applications.