โ† Back to microservices patterns map
๐Ÿฆ
Microservices Pattern

Canary Deployment

Release to a small percentage of traffic, monitor, then gradually increase.

deploy

Detailed Description

Canaries reduce release risk by exposing new code to a small group first.

Automated canaries should watch error rate, latency, and business metrics.

Roll out in traffic steps (for example 1% -> 5% -> 25% -> 50% -> 100%) with explicit gates.

Define rollback thresholds in advance: 5xx spike, p95/p99 latency regression, or checkout/payment drop.

Canary is a release-safety strategy, not a product experiment strategy.

Visual Diagram

5% -> v2 canary
95% -> v1 stable
Monitor errors/latency
Increase or rollback

Tradeoffs

Pros

Real-user validation with limited blast radius

Cons

Needs metrics and traffic splitting

Examples: Argo Rollouts, Flagger, Spinnaker, Istio weights