Mermaid exampleFlowchart

Blue-Green Deployment Flowchart with Rollback Path

Blue-green deployment keeps two identical production environments and moves traffic between them with a router change. Teams reach for this diagram when they explain to stakeholders how a release can be undone in seconds, and when they define what "healthy" has to mean before the switch happens.

  • blue green deployment diagram
  • zero downtime deployment
  • rollback flowchart
  • deployment strategy diagram
Blue-Green Deployment Flowchart with Rollback Path

100% traffic

yes

no

stable

regression

Users

Router / load balancer

Blue environment
current release

New release

Green environment
idle

Health checks pass?

Switch router to green

Fix and redeploy to green

Monitor error rate

Decommission blue

Switch router back to blue

Open in editor → 12 linesrenders in GitHub, Notion, Obsidian

Mermaid code

flowchart TD
    U[Users] --> R[Router / load balancer]
    R -->|100% traffic| B[Blue environment<br/>current release]
    N[New release] --> G[Green environment<br/>idle]
    G --> H{Health checks pass?}
    H -->|yes| S[Switch router to green]
    H -->|no| F[Fix and redeploy to green]
    F --> G
    S --> M[Monitor error rate]
    M -->|stable| D[Decommission blue]
    M -->|regression| RB[Switch router back to blue]
    RB --> F

Paste this into any tool that renders Mermaid, or into the editor to change the theme and export PNG or SVG. Syntax reference: Flowchart guide.

What this diagram shows

Here Blue environment serves all traffic while New release lands on the idle Green environment. The Health checks pass? diamond gates the Switch router to green step. After the switch, Monitor error rate decides whether blue is decommissioned or the router flips back. The rollback edge RB --> F shows that a reverted release goes back to the fix loop rather than being abandoned.

How to adapt it

  • Replace Router / load balancer with the component that actually moves traffic for you, such as a DNS record, an ingress controller, or a service mesh.
  • Add a Run smoke tests node between Green environment and the health check diamond if you run synthetic tests before exposing real users.
  • For canary releases, change 100% traffic to 95% traffic on blue and add a 5% traffic edge from the router to green.
  • Swap Decommission blue for Keep blue as standby if you leave the old environment running until the next release.

FAQ

Why is the new release drawn as a separate node instead of an edge into green?

So the diagram has an obvious starting point for the release process that is separate from the live traffic path. Readers can follow users from Users and the release from New release without the two lines crossing.

How do I show the database in a blue-green setup?

Add a single DB[(Shared database)] node and connect both environments to it. The cylinder shape [( )] signals storage. Drawing one database also makes the point that schema changes must be backward compatible.