During a canary, the new version's error rate is 3% versus 0.1% on stable. How do you catch and stop this automatically?
IntermediateTroubleshooting5xx errors
Answer
Likely causes → A regression that only real traffic triggers. The problem is detection speed: without per-version metrics, 3% on 10% of traffic looks like a 0.3% blip overall.
Diagnose → Split request metrics by version label:
sum(rate(http_requests_total{code=~"5..",version="v2"}[5m])) / sum(rate(http_requests_total{version="v2"}[5m]))
Fix → Shift canary weight back to 0 (kubectl argo rollouts abort api, or set the weight to 0 in your mesh or LB).
Prevent → Progressive delivery with an analysis template (Argo Rollouts, Flagger) that compares canary vs stable error rate and latency at each step and aborts automatically.
More on 5xx errors
Right after a release, 500s spike to 8% and logs show `java.lang.NullPointerException` in a new code path.BeginnerLong-running report exports fail with "504 Gateway Time-out" from the ALB at exactly 60 seconds.Beginnernginx logs "upstream prematurely closed connection while reading response header from upstream" and users get 502.IntermediateEvery deploy causes 10–20 seconds of 502s from the ALB, even with a rolling update.IntermediateA Node.js service behind an ALB returns a steady trickle of 502s under normal load, with no app errors at all.AdvancedThrough Istio, clients get "503 upstream connect error or disconnect/reset before headers. reset reason: connection failure".Intermediate