Skip to content
Glossary · Hosting and delivery

Blue-green deployment

Also called blue/green deployment.

Definition

A release method that runs two identical production environments and switches all traffic from the old one to the new one in one step.

Last updated

What it is.

Blue is the version live now. Green is the new version, deployed and tested alongside it with no user traffic. When green passes its checks, the load balancer or router sends all traffic to green. Blue stays running, so going back is one switch.

It differs from a canary release, which moves traffic over gradually. Blue-green is all at once, with a fast way back.

Why it matters

Releases are where most outages start. Blue-green makes a release a traffic switch rather than a change to running servers, which cuts downtime to near zero and turns rollback from a redeploy into seconds.

In a product build

We automate the switch in the CI/CD pipeline with health checks before and after. The hard part is the database: schema changes are written to work with both versions at once, so switching back does not break.

Watch out

Common mistakes.

  1. 01

    Making database changes that the old version cannot read, which kills the rollback.

  2. 02

    Turning off blue straight after the switch, before the new version has proven itself.

  3. 03

    Forgetting background jobs and scheduled tasks, which then run in both environments.

Related

Related terms.

Building something with this? Ask an engineer.

OceanLab designs and builds production software. Tell us what you are planning and we will reply with how we would approach it.

OceanLab

Enterprise Software Engineering - Human + AI

Languages

Locations

Global Headquarters

21 Merchant Road, 3rd Floor, Singapore 058267

Main corporate office and leadership operations

North America Office

548 Market Street, PMB 12472, San Francisco, CA 94104

Client operations and business development

India Office

402 Shivalik Shilp II, SG Highway, Ahmedabad 380015

Engineering and delivery center

© 2026 - Copyright. All Rights reserved OceanLab