Skip to content

Blue/green deployment

Blue/green deployment runs two identical production environments — blue and green — with the live traffic pointed at one while the other receives the new version; switching is a routing change, rollback is another switch.

Definition

What it is

Blue/green is the simplest reversible deploy: two identical environments, only one is live. Deploy the new version to the idle environment, verify it, then flip the router. Rollback is flipping back.

Why it matters

Zero downtime, instant rollback, no "cold start" of the new environment. The cost is doubling infrastructure.

Blue/green vs canary vs rolling

Aspect

Blue/green

Canary

Rolling

Traffic shift

100% at once

Progressive

One instance at a time

Rollback

Switch env

Route away

Redeploy old

Cost

2×

1× + metrics

1×

Detect regressions

Pre-flip only

Continuous

Per-instance

Origin

The pattern was named by Jez Humble and Martin Fowler in the late 2000s, formalized in Continuous Delivery (2010). The names come from the two colors used on a whiteboard to distinguish environments.

Evidence

FAQ

Blue/green vs canary?

Blue/green flips all traffic at once; canary sends a slice first and widens. Both roll back fast.

Do I need two physical environments?

Not always. Two sets of containers on the same cluster work.

How is the flip done?

At the load balancer, DNS or CDN, depending on the layer you control.

Does it work for databases?

Only if the schema is backward-compatible; otherwise you need a migration strategy (expand/contract).

Connections

Etymology

Origin: compound

  • blue (noun): color name; environment label
  • green (noun): color name; environment label

Semantic network

Blue/green ddeploymentCanaryRollbackContinuous

● broader ● narrower ● related

Broader

  • deployment-strategy

Related

Sources