roll-out-a-canary-release
Use when a change is too risky for an all-at-once deploy — routes a small traffic slice to the new version, gates promotion on SLO comparison against stable, and reverts on regression.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- roll-out-a-canary-release
- description
- Use when a change is too risky for an all-at-once deploy — routes a small traffic slice to the new version, gates promotion on SLO comparison against stable, and reverts on regression.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md351 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Roll out a canary release
Ship to 1% of traffic first. Compare the canary's error rate and latency against the stable version on the same traffic mix, and promote only if the canary is not worse. This catches the regressions that pass every pre-production test.
Procedure
-
Route by a stable key (user-id hash, header, or mesh weight) so a user's experience is consistent within the canary, not round-robin per request: # Istio VirtualService http: [{ route: [ {destination: {host: app, subset: stable}, weight: 99}, {destination: {host: app, subset: canary}, weight: 1 } ] }]
-
Size the canary so the sample is meaningful: at least 1000 requests and 30 minutes before judging. At 1% of 100 rps that is about 17 minutes of traffic.
-
Compare against stable measured at the same time, never against yesterday — the traffic mix shifts daily: canary_err = rate(err{version="canary"}[5m]) / rate(req{version="canary"}[5m]) stable_err = rate(err{version="stable"}[5m]) / rate(req{version="stable"}[5m])
-
Promotion gates, all must hold: canary error ratio ≤ stable + 0.2 pp, canary p99 ≤ stable × 1.1, no error code new to the canary, canary saturation < 0.8.
-
Step the weight 1 → 5 → 25 → 50 → 100, holding each step at least 15 minutes and re-checking the gates. On any breach, set the canary weight to 0 immediately and keep the pods for logs.
-
Automate the gate with Argo Rollouts
AnalysisTemplateor Flagger so promotion is not a human watching a dashboard at 2 a.m. -
Run the canary long enough to catch slow leaks — memory, file descriptors, goroutines — which all pass a 15-minute latency check.
Pitfalls
- Judging on too little traffic: 20 requests give a meaningless ratio and the gate flaps.
- Comparing the canary with yesterday's stable, so a global regression looks like a canary-only win.
- A canary that differs from stable in more than the code (different config or replica count) — you are then measuring the wrong variable.
- A new error path affecting only a specific customer segment, hidden by the aggregate ratio; break down by
codeand byroute.
Verification
kubectl argo rollouts get rollout app --watch
# steps advance only while analysis passes; setWeight 0 on failure
curl -s 'localhost:9090/api/v1/query?query=sum(rate(err{version="canary"}[5m]))/sum(rate(req{version="canary"}[5m]))' | jq
Report: the weight schedule, the gate thresholds, the canary-vs-stable error and p99 deltas at each step, and either promotion or the timestamped revert.
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.