Deployment Strategies

Recreate, rolling, blue/green, canary, shadow and flags — each with how it works, what it risks, what it costs, and how you get back.

Deployment Strategies

Six ways to replace running code, compared on how they work, what they risk, what they cost, how you get back, and what each is actually for.

Q · Every strategy replaces running code with new code — so what actually differs between them, and how do I choose one for this change?
Recreate: Stop Everything, Then Start the New Thing

The simplest strategy, an outage by design — and the only honest answer when two versions of your system genuinely cannot coexist.

Q · When is deliberately taking the service down the correct way to deploy, and what does that window actually consist of?
Rolling: Two Versions, One Database

Replacing instances in batches keeps the service up — at the price of a window where old and new code run simultaneously against exactly the same state.

Q · While a rolling deploy is in progress, two versions of my code are live at once — what does that actually oblige me to guarantee?
Blue/Green: Paying for the Fastest Rollback There Is

Two complete environments and a router between them: reversal in seconds, exposure of one hundred percent, and a database that is still shared.

Q · What exactly am I buying with a second environment, and what does it fail to protect me from?
Canary: One Percent, Then Five, Then Watch

Exposing a small share of real traffic to the new version and widening only while health holds — the strategy that bounds width rather than duration.

Q · How do I let real production traffic find the bug without letting it find every user?
Shadow Traffic: Real Requests, Discarded Answers

Duplicating production traffic to a candidate that serves nobody — strong evidence about crashes, load and resource use, and no evidence at all about writes.

Q · How do I run the new version against real production traffic before any user depends on its answers — and what does that actually prove?
Feature Flags: Deploy Is Not Release

Shipping code that is switched off, then turning it on for whom you choose — and the four ways a flag system quietly becomes the least reviewed part of production.

Q · How do I get code into production without releasing its behaviour, and what does that decoupling cost over time?
Progressive Delivery: Exposure as a Dial

Combining a rollout strategy, an automated comparison and a release control into one idea — exposure that increases only while evidence supports it.

Q · What does it look like when the strategies in this module stop being alternatives and become one system?