All Products
Search
Document Center

Enterprise Distributed Application Service:Configure an auto scaling policy

Last Updated:Nov 28, 2023

This topic describes how to configure an auto scaling policy in the Enterprise Distributed Application Service (EDAS) console.

Background information

If you configure the number of reserved CPUs and the quota of CPUs when you create an application in a Kubernetes cluster in the EDAS console, auto scaling and horizontal pod autoscaling (HPA) are automatically enabled.

Note
  • If you configure a Service for an application and bind a Server Load Balancer (SLB) instance to the application, EDAS automatically adds and removes application instances to and from the SLB instance during auto scaling.
  • If you configure persistent storage for an application, EDAS automatically provisions persistent storage resources for application instances that are added during auto scaling.

Configure an auto scaling policy for an application

  1. Log on to the EDAS console.

  2. Log on to the EDAS console. In the left-side navigation pane, choose Application Management > Applications. The Applications page appears. In the top navigation bar, select a region. In the upper part of the page, select a namespace. In the upper-left corner, click Create Application.

  3. In the Basic Information step, specify Cluster Type and Application Runtime Environment and click Next. The following table describes the parameters.

    Parameter

    Description

    Cluster Type

    The type of the cluster in which you want to deploy the application. Select Kubernetes Clusters.

    Application Runtime Environment

    The application runtime environment. Select an application runtime environment based on the type of the hosted application.

    • Java

      • Custom: Select this option if you want to use a custom image to deploy the application in a Kubernetes cluster.

      • Java: Select this option if you want to use a universal JAR package to deploy the application as a Dubbo or a Spring Boot application. You can set the Java Environment parameter after you select this option.

      • Tomcat: Select this option if you want to use a universal WAR package to deploy the application as a Dubbo or a Spring application. You can set the Java Environment and Container Version parameters after you select this option.

      • EDAS-Container (HSF): Select this option if you want to use a WAR or FatJar package to deploy the application as a High-speed Service Framework (HSF) application. You can set the Java Environment, Pandora Version, and Ali-Tomcat Version parameters after you select this option.

    • PHP: Select this option if the application is a PHP application that runs on Apache HTTP Server.

    • Node.js, C++, Go, and Other Languages: Select this option if you want to use a custom image to deploy the application in a Kubernetes cluster. The configuration process for multi-language applications is not described in this topic.

  4. In the Configurations step, configure the environment information, basic information, deployment method, and resource parameters for the application, and click Next.
    Note If you want to enable auto scaling, you must specify the number of reserved CPUs and the quota of CPUs. Otherwise, subsequent configurations for auto scaling may be affected.
    Configurations - Configure reserved CPUs and CPU quota
  5. In the Advanced Settings step, click Scaling Settings and configure an auto scaling policy based on your business requirements.
    If you want EDAS to automatically configure HPA, make sure that Horizontal Scaling Feature for Container Group is turned on. Whether to automatically enable auto scaling
    ParameterDescription
    MetricSelect CPU Utilization or Memory Usage.
    Trigger ConditionsThe trigger condition of auto scaling. Default value: 80. A value of 80 indicates that the system automatically triggers HPA when the average CPU or memory usage reaches 80%.
    Maximum ReplicasThe maximum number of pods that can be scaled out. The default value is twice the number of pods configured for the application.
    Minimum ReplicasThe minimum number of pods that can be scaled in. The default value is the number of pods configured for the application.
  6. Click Create Application.

  7. On the Creation Completed page, check the information in the Basic Information, Configurations, and Advanced Settings sections. Then, click Create Application.

    In the upper part of the Application Overview page, click View Details. On the Change List page, view the application change process. Wait several minutes until the application is deployed. After the application change process is complete, view the status of the instance in the Basic Information section of the Application Overview page. If the status shows that a pod is running, the application is deployed.

View an auto scaling policy

  1. Log on to the EDAS console.

  2. Find the application that you want to manage and click its name to go to the application details page. In the left-side navigation tree, choose Application Settings > Auto Scaling.
  3. On the page that appears, view the auto scaling policy of the application.
    Default auto scaling policy

    In the upper-right corner of the page, you can click Modify, Enable, Disable, or Delete to manage the auto scaling policy. You can also click Event to view the event details of auto scaling records.

    You can go to the event center of EDAS and subscribe to events related to application scaling. This way, you can receive notifications when an application is scaled or an application fails to be scaled due to the limit on the number of application instances. For more information about how to subscribe to Kubernetes events of application scaling, see Event center.