An overview of the
This document describes the principles, ideas and specific methods of three common Rainbond micro-service publishing methods: rolling publishing, blue-green publishing and grayscale publishing.
I. Rolling publishing
Rainbond Platform stateless application rolling update and stateful application rolling update differences:
Stateless applications: * * * * rolling update, will first generates a new instance, a new instance starts running in the background, the platform will use health monitoring mechanism to listen on port, whether in the new instance application running normally, once listen to application running normally, line is meeting new application, the application of destruction, released in finish rolling process.
** Stateful application: ** In a non-clustered application, the old instance will be stopped before new instances are generated, and the old instance will be abolished after the new instance is updated. In a clustered application, there is no need to worry about service interruption and you can update the application in batches. To ensure the running of services.
Rainbond platform rolling publishing practice
Take stateless applications as an example
- Switching build sources
- Switching code branches
- To detect
- Number of scaling instances
- Begin to build
- In this case, two new instances will be generated to check whether the new instance is created. If the application in the new instance runs normally, the old instance will be abolished and the new version will be online
- At this point, you can look at the build history and roll back to any version of the successful build
Two. Blue green release
A blue-green deployment is to run the old version, deploy the new version, test it, verify that it’s OK, cut traffic to the new version, and upgrade the old version to the new version at the same time.
Blue-green publishing practices based on weighted platform gateway functionality
- Web services bind domain names
The Web service | The domain name | The weight |
---|---|---|
Web V1 | www.test.com | 100 |
Web V2 | www.test.com | 0 |
-
Switching between versions can be realized by applying gateway -> Access control to reduce and increase weights respectively
-
Unweight Web V1
- Adjust the weight of Web V2
At this point the viewing traffic has moved to Web V2 and the blue-green publishing is complete.
For more information about application gateways and access control, see Application Gateway Access Policies
Three. Grayscale release
Grayscale publishing is a smooth transition between black and white. Grayscale publishing can ensure the stability of the whole system, and problems can be found and adjusted at the beginning of the grayscale to ensure its impact.
Grayscale publishing practice based on weight
Control from the dimension of flow, for example, switch to the new version at the beginning of 10% flow, then gradually increase the weight, under normal circumstances until the weight of the old version is less to 0; The grayscale release is completed.
Apply Gateway -> Access Policy to add the following two HTTP access policies:
The Web service | The domain name | The weight |
---|---|---|
Web V1 | www.test.com | 90 |
Web V2 | www.test.com | 10 |
Gradually reduce the Web V1 weight and increase the Web V2 weight as required until the Web V1 weight decreases to 0.
For more information about application gateways and access control, see Application Gateway Access Policies
A/B testing practice
Refer to A/B Testing Practice for the Rainbond application A/B testing operation