What you will have at the end
A Route, orders-canary, whose requests go to the current orders service nine times out of ten and to the new version once, by weight; then a rule above it that sends every request carrying a chosen header to the new version alone, so a tester can use v2 on purpose while everyone else stays on the split. Both backends count their requests, Traffic Explorer names which node answered each request, Analytics lists both Upstreams, and the two changes are in the audit log.
Prerequisites
- Two versions of a backend. Here
orders-backendis the Upstream of the orders service in use,orders-svc:8080, andorders-v2a second Upstream for the release candidate,orders-v2:8080, which answers the same paths and adds a response header,X-Orders-Version: v2, so the article can count who answered. - A Route to the current version.
orders-canaryserves/shop/orders/*fromorders-backendand rewrites the path withproxy-rewrite; it carries no authentication, so the article can send a hundred requests without a budget in the way. - Traffic logging turned on under Traffic Explorer › Settings, a Prometheus the Environment reads, and a role that may manage Routes. The screenshots below were taken as
nora.becker.
A share by weight
Open the Route, select the Plugins tab, Add plugin, and choose traffic-split. The form is a list of Rules; each rule has a Match section and a Weighted upstreams section, and the note at the bottom of the form says how they combine: the first rule whose conditions pass takes the request, an unconditioned rule hides every rule below it, and when no rule takes the request, the Route’s own Upstream serves it.
Add one rule and leave Match empty, so it applies to every request. Under Weighted upstreams, add two entries:
- Upstream ID:
orders-v2, picked from the list of the Environment’s Upstreams, with Weight 10. - A second entry with no Upstream at all and Weight 90. The note under the list says what that means: an entry that names no upstream stands for the Route’s own Upstream, the current version.
Upstream, the third field of each entry, takes an Upstream written inline, with its own nodes, for a share that has no Upstream object; it stays empty here.

Select Add plugin. A hundred requests without any header, counted by the version header of the answer:
100 requests without a header: v1=93 v2=7
The split is by chance per request, so a run of a hundred lands near 90/10 and not on it; the backends’ own logs for the same minute read 98 and 8, the extra ones being the article’s first probes.
A chosen caller goes to v2 every time
Edit the Plugin and add a second rule. Under its Match, add an entry and one Condition: Variable http_x_canary, Operator ==, Value 1; the help under the section says the rule takes the request when any one of its condition sets passes. Under Weighted upstreams, one entry: orders-v2 with Weight 100. Then move this rule above the first one with the arrow in its header, because the first rule is unconditioned and would hide it.

The Variable names a request variable: http_x_canary is the header x-canary, arg_version would be a query parameter, consumer_name the Consumer an authentication Plugin set. The Operator list holds comparisons, regular expressions, in, has and ipmatch, so the same form routes a Consumer, a client network or a version parameter to the new version.
Select Save plugin. Twenty requests with the header and a hundred without:
20 requests with x-canary: 1 → v1=0 v2=20
100 requests without the header → v1=92 v2=8
What Traffic Explorer and Analytics show
Every request is a record, and the Upstream node column names the address that answered: two addresses on one Route, the current version’s and the candidate’s, in about the share set.

Under Analytics, the list Upstreams · most requests counts the requests handed to each Upstream’s nodes on the Routes that reach it, so both versions appear with their own counts. The save itself is an audit record, and audit records are drawn as markers on the Route’s request chart, as Audit records shows.

Raising the share is a change to the two weights; moving everyone to v2 is a change to the Route’s Upstream and the removal of the Plugin. Each is an audit record.
What the audit log keeps
Adding traffic-split is a Route update with the rules as the difference, and the second save is another, with the conditioned rule added above the first. There is no secret in this Plugin, so nothing is masked.

What to do next
- Take a failing version out of rotation on its own: A failing backend out of rotation.
- Count the split in your own store, one record per request with the node that answered: Access logs to Elasticsearch, syslog and HTTP.
- Promote the Route to Production once the share has been raised to everyone: Promoting gateway configuration from staging to production.
- The traffic Plugins side by side are in the capabilities reference and on API Gateway; the solution page is Rate limiting and traffic management.