Designing a Zero-Downtime Canary Rollout with Automated Rollback
Scenario Prompt:
“You are designing the deployment pipeline for an e-commerce checkout service. Management demands zero downtime and automated rollbacks if error rates exceed 0.5% during rollouts. How do you architect this using progressive delivery?”
Substantive Technical Concepts to Hit:
Traffic Shifting via Service Mesh / Ingress
Use Argo Rollouts or Flagger with Envoy/Istio to split traffic: start by routing 5% of requests to the canary pod fleet while 95% remains on stable.
Automated Metric Analysis
Query Prometheus every 60 seconds to measure the HTTP 5xx error rate and P99 latency of the canary pods specifically compared against the baseline stable pods.
Automated Rollback Trigger
If the canary error rate exceeds the 0.5% threshold for 2 consecutive measurement cycles, instantly terminate the canary and shift 100% traffic back to stable.
Progressive Promotion
If all metric checks pass, gradually increase traffic (5% -> 20% -> 50% -> 100%) before retiring the old replica set.
- What ingress controller or service mesh (Envoy, NGINX, or AWS ALB) will manage the traffic splitting weights?
- Is the service stateless, or does it require database schema migrations that could break backward compatibility?
- What Prometheus metric interval is statistically significant for our traffic volume to prevent false-positive rollbacks?