Back

Deployment strategies

How to ship changes safely using blue/green, canary, and feature flags.

Blue/green vs canary vs rolling

Blue/green deployments run two production environments side by side. You switch 100% of traffic from blue to green in one step, with instant rollback by flipping back.

Canary releases roll out gradually: start with 1–5% of users, then 25%, then 100%. This is safer for changes that might behave differently under real traffic or data.

Rolling deployments replace instances one by one (or in batches). Old and new versions run together during the rollout-no second full environment needed. Feature flags let you deploy code behind a toggle and turn it on for a subset of users without a new release.

How deployment strategies control traffic

Blue/Green

Two identical environments. Switch 100% of traffic in one step. Instant rollback by flipping back.

Before
100%
After→ switch →
After
100%
  • Instant switch, fastest rollback
  • ! Requires 2× production capacity

Canary

Gradual rollout: send a small % of traffic to the new version, then increase. Catch issues before everyone is affected.

5% new
25% new
50% new
100% new
  • Safest for risky changes
  • ! Slower full rollout

Rolling

Replace instances one by one (or in small batches). No second full environment; old and new versions run together during the rollout.

Old
Old
New
Old
New
New

Old and new coexist during rollout; no 2× capacity needed

Feature flags

Deploy code behind a toggle. Turn the feature on for a subset of users (or 100%) without a new deployment. Combine with canary or blue/green for maximum control.

Real-world scenario: risky database migration

Expert scenario

Scenario: You are deploying a large database schema change for user data.

Decision: A pure blue/green switch can cause data divergence if users write to both schemas. A safer approach is a canary rollout combined with backward-compatible migrations and feature flags. If errors spike for the first 1% of users, you disable the flag and roll back without impacting everyone.

Sign in to track progress on your dashboard.

Ready to see how this works in the cloud?

Switch to Career Paths on the Academy page for structured paths (e.g. Developer, DevOps) and provider-specific lessons.

View role-based paths