Devii · DevOps · 2026-04-10 · 7 min read

Share

Blue-Green Deployments: Two Environments, One Live Switch

A classic release pattern: parallel stacks, traffic cutover, and fast rollback by pointer change.

**Blue-green deployment** maintains two production-capable environments (blue and green). Only one receives live traffic at a time. Deploy the new version to the idle environment, run smoke tests, then shift the load balancer or DNS to cut over.

Rollback is reversing the traffic pointer if the idle stack still runs the previous version. Database migrations complicate blue-green: expand/contract schema changes or use compatibility views so both versions can run during transition.

Operations runbook review
Operations runbook review

This differs from **rolling updates** (Kubernetes default), which replace instances incrementally. Blue-green minimizes mixed-version user sessions at the cost of double infrastructure during deploys.

Document health checks and session stickiness behavior before first production cutover. Read your platform's guide (AWS CodeDeploy, NGINX upstreams, Kubernetes with alternate Services).