Canary rollout with metric-driven promotion
Your task
Design the traffic-splitting layer of a reverse proxy / service mesh that does progressive canary rollouts: shift 1% to 5% to 25% to 100% of traffic to a new service version based on live health metrics, with automatic rollback if error rate or latency degrades. Requirements: the split must be sticky per user (a user shouldn't bounce between versions mid-session), the rollout must be observable, and rollback must be fast. Describe the routing decision, the metric-driven promotion/rollback loop, and the stickiness mechanism.
It covers
- Canary
- Traffic splitting
- Session affinity