Skip to content
BENIBIX Learn

Blue-Green Deployment

Development☁️ DevOps & CloudDeployment

Also known as Blue/Green Deployment, Blue Green Deploy, Red-Black Deployment

Run two full copies, then move all traffic from the old to the new.

Think of it like

Think of it like two stages side by side. You set up the next act on the dark stage, then switch the lights over.

Example

Lucy's shop runs on blue. She deploys version 3 to green, checks it, and flips the switch. A bug shows up, so she flips back to blue a minute later.

Why it matters

Going back is instant, since the old version never stopped. It is one of the safest ways to ship.

Definition

Blue-green deployment keeps two full copies of the live setup. They are called blue and green. One serves users while the other sits idle. You deploy the new version to the idle one and test it there. Then you switch all traffic over at once. If something is wrong, you switch back in seconds, because the old copy is still running.

Common mistake

Forgetting the database. Both copies often share one, so a change to its tables must work with both versions.

Key takeaways

  1. 1
    Two full copies. One live, one idle.
  2. 2
    Switch all at once. Every user moves together.
  3. 3
    Instant way back. The old copy still runs.

Compare