CI/CD Deployment Blue-Green Canary

Blue-Green, Canary & Rolling: Deployment Strategies Compared

OH
Omar Hassan
Platform Lead
Jun 10, 2025
16 min read

What You'll Learn

Compare the top deployment strategies used in DevOps: Recreate, Rolling Update, Blue-Green, and Canary releases. Learn when to use each and how they impact uptime and risk.

Deployment Strategy Overview

Deploying a new version of an application to production is risky. Deployment strategies are patterns that help mitigate this risk, balancing downtime, user impact, and infrastructure costs.

Rolling Update

Gradually replaces instances of the previous version with instances of the new version. The default strategy in Kubernetes.

V1 V1 V1 V2 V1 V1 V2 V2 V2
✅ Pros: Zero downtime, no extra infrastructure cost, gradual rollout.
❌ Cons: Rollback takes time, V1 and V2 run concurrently (DB schemas must be compatible!).

Blue-Green Deployment

Two identical environments run simultaneously. Blue runs V1 (live). Green runs V2 (testing). Once Green is verified, the load balancer is instantly flipped to route traffic to Green.

Blue (Live)
V1 V1
FLIP →
Green (Live)
V2 V2
✅ Pros: Instant rollback (just flip back), safe testing in prod environment.
❌ Cons: Expensive (requires 2x infrastructure), database sync can be complex.

Canary Release

Route a small percentage of live traffic (e.g., 5%) to the new V2. Monitor error rates. If successful, gradually increase traffic until 100%.

Load Balancer
95% V1 / 5% V2
✅ Pros: Safest strategy, tests with real user traffic, blast radius is minimal.
❌ Cons: Complex to set up (requires advanced traffic routing like Istio), slow rollout.

Recreate (High Downtime)

Terminate all old instances, then spin up all new instances. Guaranteed downtime.

✅ Pros: Simple, guarantees V1 and V2 never run concurrently.
❌ Cons: Guaranteed downtime for users.

Summary: Which one to choose?

Strategy Downtime Cost Rollback Time
RecreateHighLowSlow
RollingZeroLowMedium
Blue-GreenZeroHigh (2x)Instant
CanaryZeroLowInstant

Keep Reading

D
DevOps

Docker Networking Demystified: Bridge, Host & Overlay

8 min read Read More
C
Cloud

AWS IAM Roles vs Users vs Policies

10 min read Read More
P
Programming

Understanding Python's GIL & Multiprocessing

14 min read Read More