Cloud & Software Development

Blue-green deployment

Also known as: blue/green deployment, red-black deployment, blue-green release

Blue-green deployment keeps two identical production environments, 'blue' and 'green.' One serves users while the new version is installed and tested on the other; then traffic switches over in one step.

If something breaks, you switch back. While it offers some of the fastest rollbacks available, it doubles infrastructure during releases and does nothing to protect you from a bad database change.

Blue-green deployment, explained at three levels

At home

Imagine a restaurant with two identical kitchens. While one serves dinner, the other is set up with a new menu. When it's ready, waiters start taking orders to the new kitchen. If the new dishes go wrong, they go back to the old one.

At work

Blue-green deployment reduces downtime during updates. Customers keep using the current version while the new one is prepared, and the switch takes seconds. Rolling back is just as fast.

Real-world examples

At home

Thomas ran a small online store and dreaded updates that took his site down. His hosting provider offered blue-green deployments, so now he tests each update on the idle copy and switches over during his lunch break.

At work

Carlos is a release manager at a Quebec government services portal. With blue-green deployment, his team switched to a new version at 6 a.m., found a login bug at 6:05, and switched back by 6:06, before most citizens noticed.

How it compares

featureBlue-green deploymentRolling deployment
Switch styleAll traffic at onceServers updated one batch at a time
Rollback speedSecondsSlower, reverse the roll
Extra capacityA full second environmentLittle or none
Mixed versionsNo, one version at a timeYes, during the rollout

Blue-green buys instant rollback with extra infrastructure.

For analysts

Blue-green is easy to approve and hard to do well when data is involved. I'd ask the team to explain how a rollback works if the database has changed, because that answer tells you whether the safety net is real.

History & origin

The technique came out of work at ThoughtWorks in the mid-2000s and was popularized by Jez Humble and David Farley's 2010 book Continuous Delivery and a Martin Fowler article that same year. Cloud computing made it practical for more teams, because spinning up a second environment no longer meant buying a second set of servers. Cloud services such as AWS Elastic Beanstalk and CodeDeploy built blue-green switching into their tooling. In my view, blue-green is the most intuitive release strategy to explain to non-technical stakeholders: there's an old house and a new house, and you just move the front door.