This route service allows to divert a configurable percentage of traffic to the bound route. This traffic will be redirected for the purpose of A/B testing, or canary releasing. This image shows its usage.
This project was forked and adapted from here: https://github.com/nebhale/route-service-example
The application is written in Java 8 and packaged as a self executable JAR file. This enables it to run anywhere that Java is available.
See the file install.sh for deployment. You will have to adapt the routes in the installation script to match your CloudFoundry installation. Manual installation would require the following steps:
- Push a sample application (app_A)
- Push another sample application (app_B) -- possibly a new version of app_A
- Push the route service
- Configure the route service with an alternate route (route of app_b) and the amount of traffic to redirect to this alternate route (e.g. 0.2)
- Create a user defined service pointing to the route service
- Bind the user defined service to app_A
- Try out by issuing requests to app_A. Watch the logs of app_A and app_B. app_B should answer some of the requests going to app_A.
The project is released under version 2.0 of the Apache License.