1.2 KiB
1.2 KiB
title, type, tags, sources, last_updated
| title | type | tags | sources | last_updated | ||||
|---|---|---|---|---|---|---|---|---|
| Canary Deployment | concept |
|
|
2023-08-08 |
Definition
Canary Deployment(金丝雀部署)是一种渐进式发布策略,通过逐步将流量从旧版本切换到新版本,降低新版本上线风险——先让少量用户("金丝雀")使用新版本,观察无异常后再全量发布。
How It Works
- 小流量引入:新版本部署后,仅将少量流量(如 5-10%)引导至新版本实例
- 监控验证:通过 CloudWatch/Grafana 等监控指标对比新旧版本表现
- 渐进切换:验证通过后,逐步增加新版本流量比例(如 25% → 50% → 100%)
- 自动回滚:若新版本指标异常,自动将流量切回旧版本
ECS Context
ECS 模块内置 Canary Deployment 支持,结合 ALB(Application Load Balancer)的目标组权重规则,实现零停机渐进式发布。
Connections
- ECS-Module ← includes ← Canary Deployment
- Infrastructure-as-Code:Canary 部署通过 Terraform IaC 定义
- Auto-Scaling:常与自动扩缩容配合使用