Canary Routing
Sends 10% of traffic to a canary backend while the stable backend handles the remaining 90%
Category: Practical
Task: Sends 10% of traffic to a canary backend while the stable backend handles the remaining 90%
Prerequisites: The product runtime and any backend services referenced by this configuration.
Run it: Use ghcr.io/praxis-proxy/praxis:0.7.2 and follow the first reverse-proxy tutorial to mount and start the configuration.
This configuration comes from the selected release. The example has not been run here; external services are not bundled.
Download the source file.
# Canary Routing
#
# Sends ~10% of traffic to a canary backend while the stable
# backend handles the remaining ~90%. Weighted round-robin
# controls the split.
#
# ┌────────┐
# │ client │
# └───┬────┘
# │
# ┌───▼────┐
# │ proxy │ :8080
# └───┬────┘
# │ round_robin (weights 9:1)
# ├──────────────────────┐
# ┌───▼────┐ ┌───▼────┐
# │ stable │ :3001 │ canary │ :3002
# └────────┘ ~90% └────────┘ ~10%
#
listeners:
- name: default
address: "127.0.0.1:8080"
filter_chains:
- main
filter_chains:
- name: main
filters:
- filter: router
routes:
- path_prefix: "/"
cluster: backend
- filter: load_balancer
clusters:
- name: backend
load_balancer_strategy: round_robin
endpoints:
- address: "127.0.0.1:3001"
weight: 9 # stable — ~90% of requests
- address: "127.0.0.1:3002"
weight: 1 # canary — ~10% of requests
insecure_options:
allow_private_endpoints: true # example proxies to local backends