Microservices Based on Kato


This document describes the three common publishing methods for microservices based on Kato, the principles, ideas, and specific methods of rolling publishing, blue-green publishing and gray-scale publishing.

1. Rolling Release

Kato platform stateless component rolling update and state component rolling update difference:

Stateless component: When rolling update, a new instance will be generated first, and the new instance will run in the background after it is started. The platform will use the health monitoring mechanism to monitor the port to determine whether the application in the new instance is running normally. If the application is running normally, new applications will be launched and old applications will be destroyed to complete the rolling release process.

**Stateful components: ** If it is a non-clustered application, the old instance will stop running before generating a new instance. After the new instance is updated, the old instance will be abolished. If it is a clustered application, it is not necessary Worried about service interruption, you can update in batches. To ensure the operation of the service.

Kato platform rolling release practice

Here is an example of stateless components

  • Switch build source
  • Switch code branch
  • Test again
  • Number of scaling instances
  • Rebuild
  • Two new instances will be generated at this time, check whether the new instance has been created, if the application in the new instance is running normally, the old instance will be abolished, and the new version will be online.
  • At this time, check the build history in Overview–>View History Versions, and you can roll back to any successful build version

2. Blue-green Release

Blue-green deployment is to keep the old version, deploy the new version and then test, confirm OK, cut the traffic to the new version, and then the old version is also upgraded to the new version.

Blue-green publishing practice based on weighted use of platform gateway functions

  • Web service binding domain name
Web ServicesDomain NameWeight
Web V1www.test.com100
Web V2www.test.com0
  • Use Application Gateway->Access Control to reduce and increase the weights respectively to switch between versions
  • Remove the weight of Web V1
  • Adjust the weight of Web V2

At this point, the viewing traffic has been transferred to Web V2, and the blue-green release has been completed.

For more information about application gateways, please refer to Application Gateway Access Control

3. Gray Release

Grayscale publishing refers to a publishing method that can smoothly transition between black and white. Gray release can ensure the stability of the overall system, and problems can be discovered and adjusted at the initial gray level to ensure its impact.

Gray publishing practice based on weight

From the perspective of traffic, for example, the first 10% traffic is switched to the new version, and then this weight is gradually increased. Under normal circumstances, the weight of the old copyright is less than 0; that is, the grayscale release is completed.

Still add the following two HTTP access policies through Application Gateway -> Access Policy:

Web ServicesDomain NameWeight
Web V1www.test.com90
Web V2www.test.com10

Gradually reduce the weight of Web V1 and increase the weight of Web V2 as needed until the weight of Web V1 is reduced to 0.

For more information about application gateways, please refer to application gateway access strategy

Four. A/B Testing Practice

For Kato’s component A/B test operation plan, please refer to A/B Test Practice