A blue/green deployment is a change management strategy for releasing software code. Blue/green deployments, which may also be referred to as A/B deployments require two identical hardware environments that are configured exactly the same way. While one environment is active and serving end users, the other environment remains idle.
Blue/green deployments are often used for consumer-facing applications and applications with critical uptime requirements. New code is released to the inactive environment, where it is thoroughly tested. Once the code has been vetted, the team makes the idle environment active, typically by adjusting a router configuration to redirect application program traffic. The process reverses when the next software iteration is ready for release.
If problems are discovered after the switch, traffic can be directed back to the idle configuration that still runs the original version. Once the new code has proven itself in production, the team may choose to update code in the idle configuration environment to provide an added measure of capability for disaster recovery.
Blue/green deployments need two identical sets of hardware, and that hardware carries added costs and overhead without actually adding capacity or improving utilization. Organizations that cannot afford to duplicate hardware configurations may use other strategies such as canary testing or rolling deployments. A canary test deploys new code to a small group of users, while a rolling deployment staggers the rollout of new code across servers.