All Products
Search
Document Center

Serverless App Engine:Roll back an application to a previous version

Last Updated:Jan 30, 2024

After you create an application in Serverless App Engine (SAE), you may frequently update the application. If an error occurs in the new version, you must roll back the application to a previous version.

Prerequisites

An application is deployed. For more information, see Deploy a demo application on SAE.

Procedure

  1. Log on to the SAE console.
  2. In the left-side navigation pane, click Applications. In the top navigation bar, select a region. Then, click the name of an application.

  3. In the upper-right corner of the Basic Information page, click Back to Earlier Version.

  4. On the Back to Earlier Version page, select a version and configure a release policy.

    回退历史版本

    Parameter

    Description

    Select Earlier Version

    Select the previous version to which you want to roll back the application.

    • Download: Click Download to download the deployment package of the selected version.

    • View Details: Click View Details in the Configuration Information column of the selected version to view the application configurations of the version.

    Resume Auto Scaling After Application Deployment

    If an auto scaling policy is configured and enabled for an application, you must select the method to resume auto scaling during the rollback event.

    • Automatic: SAE automatically synchronizes the existing auto scaling policy during the rollback event.

    • Manual: You must manually enable the auto scaling policy for the application after the rollback event.

    Select Phased Release/Canary Release Policy

    Configure the Release Policy parameter to select a release policy for the selected version to which the application is rolled back.

    Release Policy

    Instances for Canary Release

    You must configure this parameter if you set the Release Policy parameter to Canary Release.

    The number of instances for which you want to perform the canary release.

    Remaining Batches After Canary Release

    You must configure this parameter if you set the Release Policy parameter to Canary Release.

    The number of batches in which you want to release the remaining instances after the canary release.

    Release Batch

    You must configure this parameter if you set the Release Policy parameter to Phased Release.

    The number of batches in which you want to release the instances.

    Interval Within Batch

    You must configure this parameter if you set the Release Policy parameter to Phased Release.

    The time interval at which the application instances in a batch are deployed if the number of application instances in each batch is greater than 1. You can click Show Advanced Settings to configure the following parameters.

    Minimum Available Instances

    The minimum number of available instances per rolling upgrade.

    • By Number: Enter the minimum number of available instances. If you select Use System Recommended Value, the minimum number of available instances is set to 25% of the number of existing instances.

    • By Ratio: Enter a percentage.

    Note
    • Make sure that at least one instance is available during application deployment and rollback. This ensures business continuity. If you set the value to 0, business interruptions occur when the application is upgraded.

    • If you specify a percentage, the minimum number of available instances is rounded up to the nearest integer. For example, five instances are available and you specify 25%. In this case, the minimum number of available instances is 2.

    Enable Canary Release Rule of Microservices

    The canary release rule that you created for Spring Cloud or Dubbo applications.

  5. Click OK.

  6. Verify the result.

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

    • Method 1: On the Basic Information page, click Change Details. On the Change Details page, view the execution status of the change.

    • Method 2: In the left-side navigation pane, click Change Records. On the Change Records page, view the value that is displayed in the Change Status column. If Executed is displayed in the Change Status column, the application is rolled back to the specified previous version. Click View in the Actions column. On the Change Details page, view the execution status of the change.