Blue/Green Deployments

Here's the gist.

  • Maintain two identical environments (blue: running version, green: new version).

  • Deploy and thoroughly test the new version in the green environment.

  • Switch traffic from blue to green using a load balancer (all at once or gradually).

    • All at once (cutover) is faster but riskier.
    • Gradual rollout (canary deployment) minimizes risk but takes longer.
  • Closely monitor the green environment after switching traffic.

  • Roll back to blue if critical issues occur.