Process Flow - Canary deployments
Start Deployment
Deploy New Version to Small %
Monitor Metrics & Logs
Increase %
Repeat
This flow shows deploying a new version to a small user portion, monitoring it, then either increasing traffic or rolling back.
upstream backend {
server stable:80 weight=90;
server canary:80 weight=10;
}
server {
listen 80;
location / {
proxy_pass http://backend;
}
}| Step | Action | Traffic % to Canary | Traffic % to Stable | Result |
|---|---|---|---|---|
| 1 | Start deployment | 0% | 100% | All traffic to stable version |
| 2 | Deploy canary with 10% traffic | 10% | 90% | 10% users see new version |
| 3 | Monitor metrics | 10% | 90% | No errors detected |
| 4 | Increase canary to 30% | 30% | 70% | More users see new version |
| 5 | Monitor metrics | 30% | 70% | No errors detected |
| 6 | Increase canary to 50% | 50% | 50% | Half users see new version |
| 7 | Monitor metrics | 50% | 50% | Errors detected |
| 8 | Rollback to stable | 0% | 100% | All traffic back to stable |
| 9 | End deployment | 0% | 100% | Deployment stopped due to errors |
| Variable | Start | After Step 2 | After Step 4 | After Step 6 | After Step 8 | Final |
|---|---|---|---|---|---|---|
| canary_traffic_percent | 0% | 10% | 30% | 50% | 0% | 0% |
| stable_traffic_percent | 100% | 90% | 70% | 50% | 100% | 100% |
| deployment_status | stable | canary started | canary increased | canary increased | rolled back | stable |
Canary deployments gradually route a small % of traffic to a new version. Monitor for errors before increasing traffic. Rollback immediately if errors occur. Use NGINX weighted routing to control traffic split. This reduces risk of full rollout failures.