Skip to content

Canary release

Коротко:

Canary release (canary deployment) — pattern постепенного rollout: 1-5% пользователей получают новую version, monitoring сравнивает error rates, latency. Если метрики good → ramp up до 100%. Если bad → rollback. В отличие от blue-green (100%/0% swap), canary даёт progressive risk mitigation. Tool: Argo Rollouts, Flagger, Istio weighted routing.

Ниже: подробности, пример, смежные термины, FAQ.

Подробности

  • Start: 1% traffic → new version, 99% → old
  • Monitor: error rate, p99 latency, custom metrics vs old
  • Auto-rollback: если thresholds violated (configurable)
  • Ramp: 1% → 5% → 25% → 50% → 100% over 30-60 min
  • Rollback instant: switch 0% traffic к new (no downtime)

Пример

# Kubernetes Argo Rollouts
spec:
  strategy:
    canary:
      steps:
      - setWeight: 1
      - pause: {duration: 5m}
      - setWeight: 25
      - analysis: {successRate: '>=99.9'}
      - setWeight: 100

Смежные термины

Больше по теме

Часто задаваемые вопросы

Canary vs blue-green?

Blue-green: instant 100% cut. Canary: gradual %. Canary safer для unknown-risk changes, blue-green faster для confident releases.

Для statefull services?

Сложнее — DB migrations + schema compat нужны support обеих versions. Или separate canary не критичный path (backend feature, не DB migration).

Какие metrics monitor?

Error rate (HTTP 5xx), p50/p99 latency, custom business (orders/min, conversion). Сравнивайте canary vs control cohort.