After you create and deploy an application in Enterprise Distributed Application Service (EDAS), you may need to update the application. If an updated application does not run as normal, you can roll back the application to its earlier version. This topic describes how to update and roll back an application.
Upgrade an application
The following table lists the update policies and methods that you can use to update an application in different scenarios.
Upgrade policy | Scenario | Upgrade method | Documentation |
---|---|---|---|
Release to all at once (direct upgrade) | If an application has a small number of instances or has a simple service architecture, you can directly upgrade the application after you develop and test the application. Namely, you can directly deploy a new version of the application. |
| |
Phased release | If an application has a large number of instances or has a complex service architecture, you can release the application in multiple phases. The application is upgraded on only some of the instances in each phase. The phased release is complete until the application is upgraded on all the instances. If an error occurs during the phased release, you can terminate the process and roll back the application. You can release the application again after the error is fixed. |
| |
Canary release | A new application version needs to be verified on a small number of instances. If the verification is successful, you can upgrade the application on all instances. | Console | Use the EDAS console to implement canary releases of applications in Kubernetes clusters |
Roll back an application
During an application upgrade process, the application may fail to be upgraded due to exceptions, such as an unavailable deployment package and a health check failure. In this case, the application upgrade process is automatically terminated and the application is rolled back.
If you find that issues or exceptions occur in the new version of an application, you can manually roll back the application. The following two scenarios are available:
- Rollback during the upgrade: You can terminate the application upgrade process and roll back the application.
- Rollback after the upgrade: You can roll back the application by deploying the historical version of the application.
Enterprise Distributed Application Service (EDAS) allows you to roll back applications by performing operations in the EDAS console and calling API operations. For more information, see the following topics:
- Roll back an application in a Kubernetes cluster in the EDAS console
- Terminate an application upgrade process and roll back the application: AbortAndRollbackChangeOrder
- Roll back an application by deploying the historical version of the application: RollbackApplication