Files
nexus/wiki/concepts/Canary-Deployment.md

29 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Canary Deployment"
type: concept
tags:
- Deployment
- ECS
- IaC
sources:
- learning-sessions-cloud-transformation-programme-20230808-183322-meeting-recordi
last_updated: 2023-08-08
---
## Definition
Canary Deployment金丝雀部署是一种渐进式发布策略通过逐步将流量从旧版本切换到新版本降低新版本上线风险——先让少量用户"金丝雀")使用新版本,观察无异常后再全量发布。
## How It Works
1. **小流量引入**:新版本部署后,仅将少量流量(如 5-10%)引导至新版本实例
2. **监控验证**:通过 CloudWatch/Grafana 等监控指标对比新旧版本表现
3. **渐进切换**:验证通过后,逐步增加新版本流量比例(如 25% → 50% → 100%
4. **自动回滚**:若新版本指标异常,自动将流量切回旧版本
## ECS Context
ECS 模块内置 Canary Deployment 支持,结合 ALBApplication Load Balancer的目标组权重规则实现零停机渐进式发布。
## Connections
- [[ECS-Module]] ← includes ← Canary Deployment
- [[Infrastructure-as-Code]]Canary 部署通过 Terraform IaC 定义
- [[Auto-Scaling]]:常与自动扩缩容配合使用