Skip to content
Ship It
Strategies/Traffic layer

Progressive delivery

Canary steps promoted, or rolled back, by metrics.

A canary with the human taken out of the loop. A controller such as Argo Rollouts or Flagger moves traffic step by step and, at each step, queries your metrics (Prometheus, Datadog, CloudWatch…) against thresholds you defined. Pass, and it promotes. Fail, and it aborts and rolls back in seconds, often before anyone is paged.

USERSROUTINGPODSRolloutv2: 0%canary: 0%v1SERVINGv1SERVINGv1SERVINGv1SERVING
0.0s / 19s

Step 1 of 7: Stable. v1 serves everyone. A Rollout resource will move traffic step by step and an AnalysisTemplate decides whether each step is healthy.

Availability
100%
No downtime
Pods running
1.00×
Peak 1.00× of normal
Blast radius
—
Inject a bug to measure
Time to recover
—
No incident
v1 (current)v2 (new)StartingIdle or shadow (no user traffic)SucceededFailed

Trade-offs

More filled is better for you
Uptime during deploy
4 out of 4.No downtime
Low infra cost
2 out of 4.Grows with the weight; 2× at promotion
Rollback speed
4 out of 4.Automatic, in seconds
Small blast radius
4 out of 4.Small and short-lived
Simplicity
0 out of 4.Controller, metrics and tuned thresholds
One version at a time
1 out of 4.Mixed versions throughout

Pros and cons

Pros

  • Fastest detection and rollback of any traffic strategy. Machines watch every step.
  • Consistent and repeatable. The same gates apply to every release, at 3pm or 3am.
  • Encodes what "healthy" means as code, reviewed like everything else.

Cons

  • Only as good as your metrics and thresholds. Bad queries give false confidence or flaky aborts.
  • More moving parts: controller, metric provider, analysis templates.
  • Low-traffic services may not produce enough data for a confident verdict.

When to reach for it

Use it when

  • You deploy often and want safety without someone watching dashboards.
  • You have reliable, per-version SLI metrics.
  • A platform team can own the templates for many services.

Avoid it when

  • You have no metrics you'd trust to make the call.
  • Releases are rare and hand-held anyway.

How to do it

apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata:
  name: success-rate
spec:
  args:
    - name: service-name
  metrics:
    - name: success-rate
      interval: 1m
      failureLimit: 1
      successCondition: result[0] >= 0.99
      provider:
        prometheus:
          address: http://prometheus.monitoring:9090
          query: |
            sum(rate(http_requests_total{service="{{args.service-name}}",code!~"5.."}[2m]))
            /
            sum(rate(http_requests_total{service="{{args.service-name}}"}[2m]))

Gotchas

  • Query the canary's metrics only. Mixing in stable traffic dilutes the signal.
  • Set a minimum request count, or the analysis passes on zero data.
  • Business metrics such as checkout rate catch bugs that 5xx rates miss. Combine both.
  • Use failureLimit and inconclusive states so a single noisy datapoint doesn't abort a good release.

Pairs well with