Auto Scaling facilitates the O&M of distributed applications. Auto Scaling can detect the status of instances on which distributed applications run and scales the instances based on the dynamic changes of instance status. This keeps services uninterrupted and improves application availability. This topic describes how to use Auto Scaling to scale application instances in Enterprise Distributed Application Service (EDAS).
Background information
- EDAS is a platform as a service (PaaS) that is used to host applications and manage microservices. EDAS provides full-stack solutions to develop, deploy, monitor, and maintain applications. For more information, see What is EDAS?
- You can use Auto Scaling to scale applications that are running in Elastic Compute
Service (ECS) clusters in EDAS and used for industries such as the Internet, new retail,
gaming, and social media. During promotions, these applications experience traffic
spikes. As a result, enterprises cannot efficiently balance the fulfillment of service
level agreements (SLAs) and the minimization of resource costs. Issues such as high
response latency and system breakdown are likely to occur. EDAS uses Auto Scaling
to handle traffic spikes within seconds. This ensures that SLAs are fulfilled and
resource costs are reduced.
Note An ECS cluster serves as an environment in which you can run applications in EDAS. If you want to use an ECS cluster to host your applications in EDAS, you must create an ECS cluster. For more information, see Create an ECS cluster in the EDAS console or Create an ECS cluster by calling an API operation.
- In a single-instance environment, Auto Scaling ensures that one instance always runs
in the environment. In an environment in which the traffic fluctuates, you can use
Auto Scaling to configure the range for the number of instances that your business
may require. EDAS adds or deletes application instances based on the configured load
balancing rules. Auto Scaling determines whether to enable automatic scaling for application
instances based on the instance metrics. The following table describes the metrics.
Metric Description CPU The CPU utilization. Unit: %. RT The response time to a request. Unit: milliseconds. Load The load on the application instance. The value must be a positive integer.
Usage notes
- If you configure a scale-in rule and a scale-out rule, the metric threshold that you specify in the scale-in rule must be less than or equal to the metric threshold that you specify in the scale-out rule. Otherwise, an error is reported.
- If you enable the automatic scaling feature for your application in EDAS, the instances that are created by Auto Scaling are preferentially released during scale-in activities.
Procedure
You can use Auto Scaling to automatically scale application instances in EDAS. You can configure scaling rules in the EDAS console to enable the automatic scaling feature. The following section describes how to configure a scale-out rule in the EDAS console to enable the automatic scaling feature for application instances.
- Log on to the EDAS console.
- In the left-side navigation pane, click Applications.
- In the top navigation bar, select a region.
- In the upper part of the Applications page, select All Microservice Namespaces from the Microservice Namespace drop-down list.
- On the Applications page, find the application for which you want to enable the automatic scaling feature and click the name of the application.
- In the left-side navigation pane of the application details page, click Auto Scaling.
- In the upper-right corner of the Scale-out Rule section, turn on
.
- Configure the parameters that are required for the scale-out rule.
- In the lower part of the Auto Scaling page, click Save.
Verify whether scaling rules take effect
After a scale-out or scale-in rule is triggered, you can use one of the following methods to verify whether the rule takes effect:
- On the Basic Information page of your application, check whether the number of instances increases or decreases.
If the number of instances increases or decreases, the scale-out or scale-in rule is in effect.
- In the left-side navigation pane of the application details page, click Change Records to view all change records of the application.
Find the change record whose Change Type is set to Scale out Application or Scale in Application and whose Source is set to auto_scale. Then, click View in the Actions column. On the page that appears, view the change details.