Course contentsShow
← Cloud and Infrastructure
Lesson 1653 of 2,98934. CI/CD FoundationsFree lesson

Rollback and Release Strategies

Understand blue-green, canary, and rolling deployments for safe production releases.

Rollback and Release Strategies

What you'll learn: How blue-green, canary, and rolling deployments minimize risk and enable safe production releases.

Why Release Strategies Matter

Deploying new code to production is inherently risky. A bad release can break your application for all users instantly. Release strategies are your safety nets—they control how new versions replace old ones, giving you control over blast radius and the ability to quickly undo changes if things go wrong.

Three Core Strategies

Blue-Green Deployment

Maintain two identical production environments: "blue" (current) and "green" (new). Deploy the new version to green, test it, then instantly switch traffic from blue to green. If issues arise, switch back to blue immediately.

Analogy: Like having two stages at a theater—prepare the next act on stage two while stage one performs, then swap the curtain in seconds.

Canary Deployment

Release the new version to a small subset of users (e.g., 5%) while most traffic stays on the old version. Monitor metrics closely. If healthy, gradually increase traffic to the new version until it reaches 100%.

Analogy: Coal miners used canaries to detect toxic gas—if the canary stayed healthy, the environment was safe for everyone.

Rolling Deployment

Gradually replace old instances with new ones, a few at a time. Instead of switching all at once, you update servers incrementally, maintaining some capacity on both versions during the transition.

Analogy: Replacing lightbulbs in a stadium row by row—the stadium stays lit throughout.

Rollback Considerations

Each strategy offers different rollback speeds: blue-green is instant, canary can halt progression immediately, and rolling requires reversing the gradual process. Choose based on your tolerance for partial failures and deployment duration.

Key Takeaway: Blue-green enables instant switches, canary tests with real users safely, and rolling updates minimize resource overhead—select the strategy that matches your risk tolerance and infrastructure constraints.