# Blue-Green Deployment — CI/CD

Source: https://www.geekswithgeeks.com/en/cicd/cicd-deploy-bluegreen

> Two full environments; switch traffic instantly, roll back just as fast.

## How it works

Keep two identical production environments, **blue** (live) and **green** (idle). Deploy the new version to green, verify it, then switch the router so all traffic hits green — blue becomes the idle standby.

## Two identical stages

Like a theater with two identical stages side by side. The new act rehearses fully on the dark stage, and only when it's ready does the spotlight switch — the audience never sees an in-between state.

## Instant rollback

If something's wrong after the switch, flip the router back to blue immediately — no redeploy needed. The cost is running two full production environments at once.
