If you want to upgrade a multilingual microservice application that is deployed in a Kubernetes cluster, you can use canary releases. You can upgrade the application and verify the new version on a small number of instances. After the verification succeeds, you can upgrade the application on all instances to the new version. This ensures service stability and performance during the upgrade.

Procedure

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, click Applications. In the top navigation bar, select a region.
  3. On the Applications page, select Namespaces. Then, select Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list, and click the name of the application that you want to publish.
  4. In the upper-right corner of the Application Overview page, choose Deploy > Deploy.
  5. On the Select Deployment Mode page, click Start Deployment in the upper-right corner of the Canary Release (Phased) section.
  6. On the page that appears, configure the parameters in the Service Mesh and Release Policy sections, and the throttling rule. Then, click OK.
    1. Configure the parameters in the Service Mesh section.
      Table 1. Parameters in the Service Mesh section
      Parameter Description
      Protocol The protocol that is used by the service. Valid values: http, http2, gRPC, and TCP.
      Service Name The name of the service that is provided by the application.
      Service Port The port number of the service that is provided by the application.
      Note The values of the Service Name and Service Port parameters must be consistent with those in the application code. Otherwise, the service cannot be registered or called.
    2. Configure the parameters in the Release Policy section.
      Table 2. Parameters in the Release Policy section
      Parameter Description
      Number of Instances for Canary Release The number of instances on which you want to publish the application in the first batch. You can view the total number of instances in the right side of this parameter. To ensure application stability, we recommend that you set this parameter to a value less than half of the total number of instances.
      Remaining Batches The number of remaining batches to publish the application. After the application is published in the first batch, the application will be published on the remaining instances based on this parameter value.
      Note Batch Mode is displayed only when the number of remaining batches is greater than 1.
      Deployment Interval Between Batches The interval to deploy the application. If the number of instances in each batch is greater than 1, the application is deployed at this interval. Unit: seconds.

      Publish Policy Configuration on the right shows the canary release procedure based on the configuration.

    3. Configure the throttling rule.

      Enterprise Distributed Application Service (EDAS) supports Canary Release by Content and Canary Release by Ratio throttling rules.

      Table 3. Parameters used to configure the two throttling rules
      Tab Parameter Description
      Canary Release by Content Protocol Type The value is fixed as Service Mesh.
      path The path in the HTTP requests for the canary multilingual application.
      Conditions You can specify this parameter based on the HTTP header value.
      Canary Release by Ratio Traffic Ratio The proportion based on which the traffic is distributed to the canary application.
      Note You can click Create Inbound Traffic Rule to create multiple throttling rules for inbound traffic. Multiple rules can take effect at a time.
    4. Optional:Configure advanced settings for the application.

    After a canary release is started, EDAS deploys the new version of the application to the specified canary instance group. The deployment progress and status are displayed on the Upgrade History page.

    Note Check whether the traffic destined for the canary instance group meets your expectations. For more information, see Monitor canary traffic.
  7. After the traffic verification succeeds, click Start the Next Batch on the right of the Upgrade History page to complete the subsequent canary release.
    If issues occur during the verification, you can click Undo in the upper-right corner of the Upgrade History page. In the Undo the Verification message, click OK.

Verify the new application version

After the canary release is complete, you can check whether Deployment Package is the new application version on the Application Overview page.