Skip to main content
DevOps Intermediate Scenario-Based Topic: Release Engineering

Compare Blue-Green vs Canary vs Rolling deployments in production

Quick Summary: Rolling updates replace instances gradually in place, Blue-Green swaps traffic between two identical full environments for instant rollback, and Canary shifts a tiny traffic percentage (e.g., 5%) to validate telemetry before scaling out.

Written by Ravi Shankar Mishra (Founder & Lead Systems Architect, MockAttempt Academy) Reviewed by MockAttempt Engineering Editorial Desk
Last verified:

Direct Interview Answer

Rolling Update is infrastructure-lean but briefly mixes v1 and v2 versions. Blue-Green ensures zero version mixing and sub-second rollback by keeping the idle Green stack warm until cutover, at 2× temporary compute cost.

Canary Releases minimize blast radius by routing 1–5% of live requests to the new build while watching error rates and P99 latency before promoting to 100%.

Detailed Technical Explanation

Regardless of strategy, database schema changes MUST follow the expand-and-contract pattern so both old and new application code run safely against the shared database during transition.

Practical Walkthrough

Kubernetes ReadinessGate + progressive Canary weight progression outline.

Code Example — YAML
steps:
  - setWeight: 5
  - pause: { duration: 5m }   # Verify 5xx error rate < 0.1% & P99 latency
  - setWeight: 25
  - pause: { duration: 10m }
  - setWeight: 100
Expected Output / Verification
Progressive blast-radius containment with metric verification gates.

Real-World Production Use Case

High-traffic checkout APIs where releasing buggy payment validation to 100% of users simultaneously would cause major revenue loss.

Common Interview Mistakes to Avoid

  • Deploying incompatible database schema renames during Rolling or Canary releases, breaking remaining old instances.
Topics: #devops #blue-green #canary #zero-downtime
Learn. Practise. Prove. Get Career-Ready.

Ready to Build Your IT Career?

Explore industry-led programmes and develop practical skills through training, assessments and interview preparation.