-
Notifications
You must be signed in to change notification settings - Fork 600
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add canary content * Update src/gateway/kong-production/canary.md Co-authored-by: Angel <Guaris@users.noreply.github.com> Co-authored-by: Angel <Guaris@users.noreply.github.com>
- Loading branch information
1 parent
11fcfb4
commit 3c4005f
Showing
2 changed files
with
37 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,40 @@ | ||
--- | ||
title: Canary Deployments | ||
|
||
content-type: reference | ||
--- | ||
|
||
## PLACEHOLDER Canary Deployments | ||
Using the [ring-balancer](/gateway/latest/understanding-kong/loadbalancing/#ring-balancer), target weights can be adjusted granularly, allowing | ||
for a smooth, controlled canary release. | ||
|
||
Using a very simple two target example: | ||
|
||
```bash | ||
# first target at 1000 | ||
$ curl -X POST http://localhost:8001/upstreams/address.v2.service/targets \ | ||
--data "target=192.168.34.17:80" | ||
--data "weight=1000" | ||
|
||
# second target at 0 | ||
$ curl -X POST http://localhost:8001/upstreams/address.v2.service/targets \ | ||
--data "target=192.168.34.18:80" | ||
--data "weight=0" | ||
``` | ||
|
||
By repeating the requests, but altering the weights each time, traffic will | ||
slowly be routed towards the other target. For example, set it at 10%: | ||
|
||
```bash | ||
# first target at 900 | ||
$ curl -X POST http://localhost:8001/upstreams/address.v2.service/targets \ | ||
--data "target=192.168.34.17:80" | ||
--data "weight=900" | ||
|
||
# second target at 100 | ||
$ curl -X POST http://localhost:8001/upstreams/address.v2.service/targets \ | ||
--data "target=192.168.34.18:80" | ||
--data "weight=100" | ||
``` | ||
|
||
The changes through the {{site.base_gateway}} Admin API are dynamic and take | ||
effect immediately. No reload or restart is required, and no in progress | ||
requests are dropped. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters