After deploying, monitor error rates and latency. Loop until canary is stable or rollback triggered.
Start the "Deploy Canary Watch" loop.
- Goal: Canary deployment is confirmed stable (error rate < 0.1%, p99 latency within 2x baseline) or rolled back if thresholds are breached.
- Max iterations: 12
- Between iterations run: `curl -s $MONITORING_ENDPOINT | jq '{error_rate, p99_latency, request_count}'`
- Exit when: canary has been stable for 3 consecutive checks (5+ minutes of healthy traffic), OR rollback has been executed.
Steps:
1. Verify the canary deployment is live and receiving traffic
2. Check current error rate and p99 latency against baselines
3. If error rate > 1% or p99 > 3x baseline: immediately trigger rollback and exit
4. If error rate > 0.1% or p99 > 2x baseline: flag as warning, continue monitoring
5. If metrics are healthy, increment the stable-check counter
6. If 3 consecutive healthy checks: canary is confirmed stable — promote to full rollout
7. Wait 2 minutes between checks to accumulate meaningful traffic
Self-pacing instructions: After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when exit condition passes or max iterations reached. Give a short status update each pass.How it works