카나리 배포
변경 사항을 서비스의 일부에 제한된 시간 동안 배포하고 평가하는 점진적 릴리스 방식.
구조와 동작 원리
화살표를 단계별로 확인하세요.
소수 트래픽으로 새 버전을 검증한 뒤 단계적으로 확대한다.
기대 효과
애플리케이션 신뢰성을 높이고 배포 위험을 줄임.
트레이드오프
피크 트래픽 중 롤백하면 안정 ReplicaSet 확장으로 일시적 브라운아웃이 발생할 수 있음.
사소한 수정, 관측성 부족, 복잡하거나 안전하지 않은 롤백 경로에는 부적합·주의.
운영 및 적용 가이드
종합 설명 · 원문 인용으로 검증된 항목과 구분됩니다. 실제 적용 전 확인이 필요합니다.
언제 사용하는가
핵심 사용자 흐름·결제·수익화처럼 실패 영향이 큰 변경이나 상태 저장 서비스, 외부 연동, 스키마/프로토콜 변경을 소수 사용자 트래픽으로 먼저 검증할 때 대표적으로 사용한다.
시나리오
월 활성 사용자 1,000만 명 규모의 이커머스에서 주문·결제 API를 새 버전으로 교체한다. 카나리 Pod에 1% 트래픽을 보내 오류율·지연·결제 실패율을 관찰하고, SLO가 유지되면 5%→25%→100%로 단계 확대한다. 이상 징후가 보이면 즉시 카나리 트래픽을 0으로 줄이고 기존 안정 버전으로 복구하며, 롤백 중에도 안정 버전 용량을 충분히 유지한다.
배치 원칙
- 안정 버전과 카나리 버전 워크로드를 나란히 배치하고 track/version 라벨로 구분한다
- 로드밸런서·인그레스·서비스 메시에서 가중치를 두어 소량 트래픽만 카나리로 보낸다
- 카나리 전 기간 안정 버전 ReplicaSet/Pod 용량을 충분히 유지해 롤백 시 트래픽을 즉시 되돌린다
- 스키마·캐시·설정은 이전 버전과 호환되도록 배치해 롤백 경로를 확보한다
- 관측성 에이전트와 배포 검증 도구를 카나리와 안정 양쪽에 동일하게 적용한다.
온프레미스
온프레미스에서는 로드밸런서/인그레스 가중치와 서버 풀 분리로 카나리 트래픽을 제어하고, 안정 용량을 상시 확보한 뒤 소량 트래픽 검증 후 확대한다. 클라우드 관리형 라우팅이 없으므로 모니터링·배포 검증·롤백 절차를 사전 자동화한다.
클라우드
클라우드에서는 관리형 Kubernetes·로드밸런서·트래픽 매니저·서비스 메시를 이용해 1%→5%→25%→100%처럼 가중치를 단계적으로 올리고, 오토스케일링과 중앙 관측성으로 카나리 상태를 판단한다. 문제 시 가중치 축소·카나리 스케일 다운·이전 버전 라우팅으로 빠르게 롤백한다.
Kubernetes
Kubernetes에서는 stable/canary Deployment와 track/version 라벨, Service selector·Ingress·서비스 메시 가중치로 트래픽을 분리한다. readiness/liveness, HPA, Prometheus·로그·트레이스로 오류율·지연을 감시하고, 안정 ReplicaSet을 full size로 유지한 채 카나리를 승격하거나 0으로 축소한다.
장애 대응
대표 장애는 카나리 오류율·지연 급증, 결제 실패, 헬스 알림, 스키마/캐시 비호환, 롤백 중 안정 버전 용량 부족이다. 알림 또는 검증 실패 시 롤아웃을 즉시 중단하고 카나리 가중치를 0으로 줄이거나 카나리 ReplicaSet을 스케일 다운해 안정 버전으로 트래픽을 돌린다. 이후 원인 조사와 영향 범위 확인 후 수정 전진(fix-forward) 또는 롤백을 결정하고, 서비스 회복과 재배포 가능 상태를 검증한 뒤 사후 분석한다.
14개 관점별 근거
조사 당시 근거 보유 여부입니다. 출처의 정확성과 최신성을 별도로 판단하세요.
정의·개요근거 있음
변경 사항을 서비스의 일부에 제한된 시간 동안 배포하고 평가하는 점진적 릴리스 방식.
We define canarying as a partial and time-limited deployment of a change in a service and its evaluation.해결하는 문제근거 있음
새 버전을 실제 프로덕션 트래픽으로 먼저 검증해 전체 배포 전 위험을 낮춤.
Test the new version with real production traffic주요 구성 컴포넌트·리소스근거 있음
안정 버전과 카나리 버전을 나란히 두고 track 라벨 등으로 구분하며 트래픽을 분배.
The stable release uses `track: stable`, and the canary release uses `track: canary`.데이터·에셋 배치 원칙근거 있음
카나리 전 기간 안정 ReplicaSet 용량을 유지하고 카나리로 트래픽을 분리 배치.
keep the stable ReplicaSet at full size for the whole canary대표 유스케이스근거 있음
결제·핵심 사용자 흐름, 상태 저장 서비스, 고위험 외부 연동, 큰 스키마/프로토콜 변경에 적용.
Changes that impact critical user flows or monetization.시나리오 예시근거 있음
무상태 API의 20% 트래픽을 canary selector로 보내는 단계적 K8s 배포 예시.
# Phase 1: Stateless services (20% traffic) kubectl patch service api-service -p '{"spec":{"selector":{"version":"canary"}}}'부적합 상황·주의근거 있음
사소한 수정, 관측성 부족, 복잡하거나 안전하지 않은 롤백 경로에는 부적합·주의.
When NOT to use / overuse: - For trivial fixes that increase release friction. - When observability is insufficient to detect failures.온프레미스 관점(개발·배포·운영)근거 있음
온프레미스 고객 데이터센터용 서비스도 Kubernetes 기반으로 배포·운영.
our newest service offering: Bitmovin Managed On-Premise encoding클라우드 관점(개발·배포·운영)근거 있음
클라우드에서 기존 프로덕션과 병렬로 무중단 배포하고 트래픽 비중을 제어.
Canary release : Deploys a new release in parallel with the original production environment (similar to Blue-Green), with no downtime.Kubernetes 관점(개발·배포·운영)근거 있음
Kubernetes에서 안정 버전 옆에 카나리 버전을 배포하고 비교해 승격·거부.
A canary deployment strategy deploys new versions of an application next to stable, production versions.장애 대응 관점근거 있음
사용자 영향 건강 지표 알림 발생 시 롤아웃을 즉시 중단하고 원인을 조사.
the rollout should immediately halt and an investigation into the cause of the alert should be performed장점근거 있음
애플리케이션 신뢰성을 높이고 배포 위험을 줄임.
Blue/green, canary, and rolling deployments all improve application reliability and reduce risk.단점·트레이드오프근거 있음
피크 트래픽 중 롤백하면 안정 ReplicaSet 확장으로 일시적 브라운아웃이 발생할 수 있음.
Possible brown-out as the stable RS scales.대표 기술·도구근거 있음
Spinnaker가 배포 검증 API를 폴링해 카나리 상태 임계치를 판단.
one Spinnaker node on the stack that actually queries this API and polls it for duration추가 참고 문헌 (21)
- Google SRE - Canary Release: Deployment Safety and Efficiency ↗
- Deploy a Release Using a Canary Deployment | Kubernetes ↗
- Implement zero-downtime deployments with blue/green, canary, and rolling strategies | Well-Architected Framework | HashiCorp Developer ↗
- Use a canary deployment strategy | Cloud Deploy | Google Cloud Documentation ↗
- Untitled result ↗
- What is Canary Deployment? When and How To Use It Effectively ↗
- What is Canary deployment? Meaning, Architecture, Examples, Use Cases, and How to Measure It (2026 Guide) - CLoudOps Now! ↗
- Canary Deployments: Pros, Cons, And 5 Critical Best Practices ↗
- How Bitmovin is Doing Multi-Stage Canary Deployments with Kubernetes in the Cloud and On-Prem | Kubernetes ↗
- Use a canary deployment strategy for Kubernetes - Azure Pipelines | Microsoft Learn ↗
- Deploy an app on Kubernetes ↗
- Azure Kubernetes Service (AKS) production upgrade strategies - Azure Kubernetes Service | Microsoft Learn ↗
- Zero-Downtime Migration to Azure Kubernetes Service (AKS) - Azure Kubernetes Service | Microsoft Learn ↗
- Serverless operations | CNCF ↗
- Architecture strategies for safe deployment practices - Microsoft Azure Well-Architected Framework | Microsoft Learn ↗
- 15.07 — Rollback playbook - The Bookstore Guide — Kubernetes from Zero to Production ↗
- Recommendations for designing a deployment failure mitigation strategy - Power Platform | Microsoft Learn ↗
- Deployment Rollback Runbook | Doc | StackPractices ↗
- Rollback | MinimumCD Practice Guide ↗
- Rollback Made It Worse: 5-Layer CI/CD Auto-Rollback Architecture and 4 Production Pitfalls | SRE Engineering Practice ↗
- Prod Lessons - Deployment Validation and Graceful Degradation - InfoQ ↗