To update a Spring Cloud or Dubbo microservice-oriented application that is deployed
in an Elastic Compute Service (ECS) cluster, you can implement a canary release to
verify the new version on a small number of instances. If the verification is successful,
you can update the application on all instances.
Prerequisites
Before you implement a canary release, make sure that the application contains at
least two instance groups and at least two groups contain instances. For more information
about how to create instance groups and add ECS instances to the groups, see
Manage instance groups of applications deployed in ECS clusters.
Limits
- High-Speed Service Framework (HSF) applications: Canary release is not supported.
- Dubbo applications: You can implement canary releases of Dubbo applications without
limits.
- Spring Cloud applications: If you use Deployment.Metadata.Name or Deployment.Metadata.Uid
to configure some features of an application, do not implement a canary release for
the application. Otherwise, the native features of the application may be abnormal
after the canary release.
Procedure
- Log on to the EDAS console.
- In the left-side navigation pane, click Applications.
- In the top navigation bar, select a region. On the Applications page, select a microservice namespace and click the name of the application for which you want to implement a canary release.
- On the Basic Information page, click Deploy Application in the upper-right corner.
- On the Select Deployment Mode page, click Start Deployment in the upper-right corner of the Canary Release (Phased) section.
- On the Canary Release page, upload the deployment package of the new application version, set the canary
release policy and rules, and then click OK.
- Upload the deployment package of the new application version.
- In the Release Policy section, set the parameters for the release policy.
The Publish Policy Configuration section on the right side shows the procedure for the canary release based on the
configuration.

The following table describes the parameters for configuring the release policy.
Parameter |
Description |
Canary Groups |
The instance group for the canary release. |
Batches per Group After Canary Release |
After the canary release for the specified instance group is complete, the new version
is deployed to application instances in other groups based on the preset batches.
- If all groups are selected, the new version is deployed to the instances in each group
based on the selected batch number. If the number of instances in a group is less
than the selected batch number, the new version is deployed to the instances in the
group based on the number of instances.
- If you have specified a group, the new version is deployed to the instances in the
specified group based on the selected batch number.
|
Batch Type for Scale-out After Canary Release |
If you set the Batches per Group After Canary Release parameter to a value of at least 2, you must set this parameter. Valid values: Automatic and Manual.
- Automatic: automatically deploys the new version to instances in batches based on the release
interval. You must set the Wait Time Before Next Batch parameter.
Valid values of Wait Time Before Next Batch are Do Not Wait, 1 Minutes, 2 Minutes, 3 Minutes, 4 Minutes, and 5 Minutes.
- Manual: manually triggers the release of the next batch.
|
Java Environment |
The runtime environment of the application. Select a runtime environment as needed.
|
- Configure canary release rules.
Enterprise Distributed Application Service (EDAS) supports Canary Release by Content and Canary Release by Ratio.
After the canary release is started, EDAS deploys the new application version to the
specified instance group. On the Basic Information page, the message A change process is ongoing for this application. The application is in Executing
state appears. Click View Details. On the Change Details page that appears, view the deployment progress and status.
Stop a change: The application is in the canary release state and this change has been stopped. Please
roll back the application before you perform other operations.
- You can check whether the traffic is distributed as expected. For more information,
see Monitor canary traffic.
- After the traffic verification is complete, click Start Next Batch on the Change Details page. Complete the subsequent batch release.
If an issue occurs during the verification process, click Stop Change in the upper-right corner of the Change Details page. After the change is stopped, on the Basic Information page, the message The application is in the canary release state and this change has been stopped. Please
roll back the application before you perform other operations.
Verify the result
After the canary release is complete, check whether the deployment package is of the new version on the Basic Information page. On the Instance Information page, check whether the instances are in the Normal state.