Glossary termTechnique

Blue-Green Deployment

Also known as: Blue/green deployment, Red-black deployment

Release technique that runs two identical production environments and switches user traffic from the old version to the new one in a single step.

Blue-green deployment reduces the risk and downtime of releasing software by keeping two production environments, conventionally called blue and green. At any moment one of them serves live traffic. A new release is deployed to the idle environment, where it can be tested under production conditions without affecting users. When it is ready, a router, load balancer or DNS change redirects traffic from the old environment to the new one. The previous environment stays intact, so if problems appear, traffic can be switched straight back.

The technique was popularized in the continuous delivery literature around 2010 as a way to make releases routine and reversible. In cloud and container platforms it is often implemented by creating a fresh set of instances for each release rather than maintaining two permanent environments, an approach that pairs naturally with immutable infrastructure. Some organizations use the term red-black deployment for a similar pattern. Once a release has proved stable, the old environment becomes the staging ground for the next version or is discarded.

Blue-green deployment differs from a canary release, which shifts a small share of traffic first and increases it gradually; blue-green switches all traffic at once, making the cutover simple but exposing every user to the new version together. Its main costs are the extra capacity needed to run two environments and the complexity of shared state. Databases are the usual difficulty: schema changes must remain compatible with both versions during the transition, which typically requires splitting changes into backward-compatible steps. Long-lived connections and in-flight sessions also need careful handling at switchover.

Key points

  • Two identical environments allow a release to be tested in production conditions before users see it.
  • Switching traffic back to the old environment provides a fast rollback.
  • Unlike a canary release, blue-green deployment moves all traffic at once.
  • Database schema changes must stay compatible with both versions during the switch.

Related entries

Glossary term

Deployment technique that releases a new software version to a small subset of users or servers first, expanding only if it behaves well.

Glossary term

Software engineering approach in which every change is built, tested and prepared so that it can be released to production safely at any time.

Glossary term

Device or software that distributes incoming network traffic across multiple servers to improve capacity, responsiveness and availability.

Glossary term

Approach in which servers and other components are never modified after deployment; changes are made by replacing them with freshly built versions.

Glossary term

Feature Flag

DevOpsProgramming

Configuration switch in software that turns functionality on or off at runtime, allowing code to be deployed without immediately releasing it to users.

Glossary term

Design goal and set of techniques for keeping a system operational and accessible for an agreed, very high proportion of time.

Featured in guides