Route splitting is to distribute the traffic of a route to different back-end services in proportion and weight. The principle is the same as load balancing with weights. If you have used Aliyun SLB, you should be familiar with it.

while true; 2 > do curl http://hello-microservice-blue-reactive-microservices.192.168.99.100.nip.io & 1; echo ''; sleep 1; done;

The sample process

Let’s take a VertX Hello MicroService as an example

Download the required code

https://github.com/redhat-developer/reactive-microservices-in-java.git
cd openshift/hello-microservice-openshift
mvn fabric8:deploy -Popenshift

After the deployment is complete, change

in the pom.xml to hello-microservice-blue and execute the following build command again to create a new deployment:

mvn fabric8:deploy -Popenshift

In this way, there are two deployments with different names in OpenShift, each representing two different versions of the application.

Routing split configuration

Routing information page

Then open the route in a different browser and you will see different output. Of course, for the hello-microservice-blue deployment, you’ll have to modify the output code a little to distinguish it.

Because the route has Session Affinity, you need to use a different browser to see the effect. This is the implementation of the application of blue and green deployment, grayscale release, A/B testing, and so on similar pilot, and then promote the mechanism. Minimize the extent of possible influence.

The resources

  • https://developers.redhat.com…