bonus-lab-canary-releases
Overview:
Using the ring-balancer, target weights can be adjusted granularly, allowing for a smooth, controlled canary release.
Scenario
In this exercise, you will expand on Load Balance Incoming Request with Kong Ring Balancer lab
HIGH LEVEL TASKS
- Create new targets with different weights (note: you cannot modify or delete the targets)
- Verify 100% access to one server
- Create 90:10 weighting
- Verify 90% access to one server
DETAIL CONFIGURATIONS
1. Create two new target with 100:0 weighting
$ http post :8001/upstreams/mockbin.org/targets/ \
target=104.28.23.173:80 \
weight=0
$ http post :8001/upstreams/mockbin.org/targets/ \
target=104.28.22.173:80 \
weight=1000
2. Verify 100% access to one server
http get localhost:8000 \
host:api.lb.com
Verify that all your request is routed to server 104.28.22.173 since the weight=1000
3. Create two new target with 90:10 weighting
$ http post :8001/upstreams/mockbin.org/targets/ \
target=104.28.23.173:80 \
weight=100
$ http post :8001/upstreams/mockbin.org/targets/ \
target=104.28.22.173:80 \
weight=900
Note: You must add new targets because these can not be modified or deleted.
###4. Verify 90% access to one server
http get localhost:8000 \
host:api.lb.com
Verify that 90% of your request is routed to server 104.28.22.173 since the weight=900
Summary
By repeating the requests, but altering the weights each time, traffic will slowly be routed towards the other target.
##Back