Manual scaling

更新时间:
复制 MD 格式

Application scaling adjusts the compute capacity of an application by changing its number of instances. You can manually scale out when the application load is high and scale in when the application is idle. This improves resource utilization and reduces costs. This topic describes how to manually scale application instances in Serverless App Engine (SAE).

Prerequisites

Background information

You can scale your application using two methods: manual scaling and auto scaling.

  • For urgent scaling needs, such as responding to a sudden traffic spike, you can use manual scaling.

  • For non-urgent scaling needs, such as handling periodic traffic peaks, you can use auto scaling. For more information, see Configure an auto scaling policy.

Limitations

When you scale out, the operation fails if the total number of new and existing instances exceeds the resource limit for the application. If you need to add more instances beyond this limit, join the DingTalk group (ID: 32874633) to submit a request.

Procedure

Warning

Application scaling can cause unpredictable issues, such as service interruptions. Perform scaling operations with caution.To prevent these issues, you can configure graceful start and graceful shutdown for your application. For more information, see Configure graceful start for microservices and Configure graceful shutdown for microservices.

  1. On the SAE Application List page, select a region and namespace at the top, and click the ID of the target application to open the application details page.

  2. On the application's Basic Information page, click Manual Scaling.

  3. In the Application Scaling dialog box, configure the parameters.

    • If the application is not deployed or an auto scaling policy is not enabled:

      Use the slider to set the Expected Application Instances, and then click OK.

    • If an auto scaling policy is configured and enabled:

      1. Use the slider to set the Expected Application Instances.

      2. Select an option for Resume Auto Scaling After Manual Scaling, and then click OK. The following table describes the options:

        • Automatic: A scheduled auto scaling policy takes effect in the next time window of the current cycle. If the conditions are not met, the policy is deferred to the next cycle. Metric-based and hybrid auto scaling policies take effect immediately after manual scaling is complete. You must check the minimum and maximum instance settings in the policy to avoid violating your service-level agreement (SLA).

        • Manual: Manually resume auto scaling.

          If you select Manual, you must later go to the Auto Scaling page for the application and manually enable the policy. Otherwise, the metric-based or hybrid auto scaling policy remains disabled.

        Note
        • For manual scaling, the number of expected application instances cannot exceed the maximum number specified in the metric-based auto scaling policy.

        • To select an option for Resume Auto Scaling After Manual Scaling, you must first configure and enable an auto scaling policy.

  4. Verify the result.

    Go to the Change Details page to view the change records.

    • Method 1: On the Basic Information page, click View Details at the top of the page to view the specific execution status of the change on the Change Details page.

    • Method 2: In the left navigation bar, click Change Records. On the Change Records page, check the Change Status. If the Change Status is Execution Successful, the application has been successfully scaled out or scaled in. Click Change Details in the Actions column to view the specific execution status of the change on the Change Details page.