A deployment strategy decides 1 thing: how many users get a new version before you know it works.

Bottom line

There are 6 deployment strategies worth knowing, and most teams need 2 of them.

  1. Recreate: stop the old version, start the new one, accept the downtime
  2. Rolling update: replace a few instances at a time
  3. Blue/green: run 2 full copies, switch all traffic at once
  4. Canary: send a small share of users to the new version first
  5. Shadow: copy real traffic to the new version and throw away its answers
  6. Feature flags: deploy the code switched off, release it later

Six cards, one per deployment strategy: recreate, rolling update, blue/green, canary, shadow, feature flags
The 6 deployment strategies. Most teams need 2 of them.

Here is where I would start, by situation:

Your situation Start with
A small team with HTTP services on Kubernetes or Amazon ECS Rolling update, tuned
A bad release costs you money within minutes Blue/green
High traffic and metrics you trust Canary with automated checks
A risky feature inside a normal release A feature flag
A rewrite you want to test under real load Shadow
An internal tool, or an app that cannot run 2 versions at once Recreate

My default for a startup: a rolling update with a readiness probe, plus a feature flag on anything risky.

That covers most releases with no new tooling and 25% of extra capacity.

Versions and defaults here were checked on November 16, 2026 against the official docs: Kubernetes 1.37, Argo Rollouts v1.10.2, Flagger v1.45.0, Gateway API v1.7.0 and the Amazon ECS documentation.

Do releases still make your team nervous? A senior engineer spends an hour on your CI/CD, infra, Kubernetes, cloud cost and on-call setup. You leave with your top 3 risks, quick wins and a rough roadmap. Claim your free assessment.

Find your situation:

Deploy and release are 2 separate steps

Most confusion about deployment strategies comes from treating these 2 words as 1.

Deploy = the new code runs in production.

Release = users get the new behavior.

The first 5 strategies change how you deploy. Feature flags change how you release.

That is why they combine. You can roll out a pod at a time and still keep the new checkout flow switched off until Tuesday.

Keep the 2 words apart and the rest of this page gets simple.

Compare the 6 strategies on 3 numbers

Every comparison table you have seen says "low risk" and "high cost". I prefer 3 things you can count:

  1. Who gets the new version first: everyone, a share, or nobody
  2. Extra capacity: what you pay for while the rollout runs
  3. What a rollback is: a switch, or another deploy
Strategy Who gets it first Extra capacity A rollback is
Recreate Everyone, after downtime 0 A second deploy, with a second downtime
Rolling update A growing share, instance by instance 25% by default on Kubernetes Another rolling update, backwards
Blue/green Nobody, then everyone 100% A switch back, while the old copy still runs
Canary A share you choose Close to 0 by replica count, up to 100% with a traffic router The canary weight back to 0 (instant only with a traffic router)
Shadow Nobody (copies of requests) A copy sized for the traffic you mirror Stop mirroring
Feature flag The cohort you choose 0 A flag flip

Read the last column twice.

A rollback that is a switch takes seconds. A rollback that is another deploy takes as long as the deploy did, and it runs while users are hurting.

Recreate: stop the old version, start the new one

Recreate is the oldest strategy and the only one with planned downtime.

On Kubernetes it is 1 of the 2 strategy types of a Deployment. All old pods are terminated, and only after they are gone are the new ones created.

What you get in return: 2 versions never run at the same time.

Use it when:

  • The app holds a lock, a volume or a license that only 1 version can own
  • The old and the new version cannot share the database for even a minute
  • It is an internal tool and nobody is using it at 7 PM

Skip it when: a customer can notice. (Recreate is what "we deploy on Sunday at 2 AM" means.)

AWS calls the same idea an in-place deployment done all at once.

Rolling update: replace a few instances at a time

A rolling update is the default on Kubernetes and on Amazon ECS, so you are probably using it already.

New instances start, old ones stop, a few at a time, until only the new version is left.

On Kubernetes, 2 fields control the pace, and both default to 25%:

  • maxSurge: how many pods can exist above the desired count. The percentage rounds up
  • maxUnavailable: how many pods can be missing. The percentage rounds down

With 10 replicas and the defaults, that means up to 13 pods running and at least 8 available at any moment.

A row of 13 pod squares for a rolling update with 10 replicas: at least 8 available, up to 13 pods, maxUnavailable 25% rounds down, maxSurge 25% rounds up
The Kubernetes defaults on 10 replicas: up to 13 pods, at least 8 available.

So with 10 replicas, the default rolling update can run your service at 80% of its capacity in the middle of a deploy. If you size replicas tightly, that is your real risk.

Here is the version I would run for a service that takes user traffic:

apiVersion: apps/v1 kind: Deployment metadata: name: api spec: replicas: 10 minReadySeconds: 10 strategy: type: RollingUpdate rollingUpdate: maxSurge: 25% maxUnavailable: 0 selector: matchLabels: app: api template: metadata: labels: app: api spec: containers: - name: api image: registry.example.com/api:1.4.2 ports: - containerPort: 8080 readinessProbe: httpGet: path: /healthz port: 8080 periodSeconds: 5 

3 lines do the work:

  1. maxUnavailable: 0 keeps all 10 pods serving for the whole rollout
  2. readinessProbe keeps traffic away from a new pod until it answers. If new pods never turn ready, the rollout stops by itself
  3. minReadySeconds: 10 makes a new pod stay ready for 10 seconds before it counts. The default is 0

The readiness probe is the part people skip. A pod with no readiness probe counts as ready the moment its containers start, so Kubernetes will happily replace all 10 pods with 10 broken ones.

(If probes are new to you, start with the readiness probe definition, then read how to configure liveness probes without restart loops.)

Use these 2 commands in your pipeline:

# Fails the pipeline if the rollout does not finish kubectl rollout status deployment/api # Goes back to the previous revision kubectl rollout undo deployment/api 

2 facts about rollbacks that surprise people:

  • Kubernetes never rolls back for you. After 600 seconds without progress (progressDeadlineSeconds) it marks the rollout as failed and keeps retrying
  • A rollback is a rolling update in the other direction. It takes about as long as the rollout did

Rolling update = cheap, built in, slow to undo.

It also means 2 versions serve users at the same time during every deploy. Your API and your database must accept that. More on this in the database section.

Blue/green: run 2 full copies and switch

Blue/green keeps the old version (blue) serving while a full copy of the new version (green) starts next to it.

You test green with no user traffic. Then you switch all traffic at once.

What happens:

Green starts

→ green passes its checks on a preview address

→ the router points to green

→ blue stays up for a while

→ blue is removed

The rollback is the fastest of the 5 ways to deploy: point the router back to blue. No pods to start, no images to pull.

The price is capacity. For the length of the switch you pay for 2 production copies.

Kubernetes has no blue/green type built in. Argo Rollouts adds it with a Rollout object, which replaces your Deployment (or wraps it with workloadRef). The strategy block looks like this:

strategy: blueGreen: activeService: api-active previewService: api-preview autoPromotionEnabled: false scaleDownDelaySeconds: 600 

Change 2 defaults, as I did above:

  • autoPromotionEnabled defaults to true. Green takes all traffic as soon as its pods are ready, with nobody looking. Set it to false, or add an analysis step
  • scaleDownDelaySeconds defaults to 30. So 30 seconds after the switch, blue is gone and your instant rollback with it. Give yourself 10 minutes

You promote with 1 command:

kubectl argo rollouts promote api 

Argo's own docs recommend starting with blue/green before canary, because only 1 version is active at a time. They also list it as the option that works for queue workers, where no router can split the traffic.

Use it when: a bad release is expensive within minutes and you can afford double capacity for 10 of them.

Skip it when: the service is so large that a second copy does not fit in your cluster or your budget.

Canary: send a small share of users first

A canary release gives the new version to a small share of users, watches it, and grows the share step by step.

(The name comes from the canaries that miners carried into coal mines. The bird reacted to gas before the miners did.)

The math is the reason to do it. In Google's SRE workbook example, a version that fails 20% of requests, given to 5% of traffic, produces a 1% error rate overall.

Same bug, 1/20 of the damage.

Blue/green sends 100% of users to the new copy at once, canary sends 90% to the old version and 10% to the new one
Blue/green switches everyone at once. A canary moves a share you choose.

With Argo Rollouts the steps are a list:

strategy: canary: steps: - setWeight: 10 - pause: {duration: 10m} - setWeight: 50 - pause: {duration: 10m} 

After the last step the rollout goes to 100%.

3 things about canaries that the comparison pages leave out:

Without a traffic router, 10% means 1 pod in 10

Plain Kubernetes splits traffic by pod count. With 10 replicas and a weight of 10, Argo runs 1 new pod and 9 old ones.

With 3 replicas, your smallest possible canary is a quarter to a third of traffic.

For a real percentage you need something that routes: an ingress controller, a service mesh, or the Gateway API. An HTTPRoute splits traffic by weight in a few lines:

apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: simple-split spec: rules: - backendRefs: - name: foo-v1 port: 8080 weight: 90 - name: foo-v2 port: 8080 weight: 10 

(The example comes from the Gateway API repository. Add parentRefs to attach it to your Gateway.)

A canary with a traffic router can cost as much as blue/green

When Argo Rollouts uses a traffic router, the old version stays scaled to 100% during the rollout, so an abort is instant.

Late in the rollout you run close to double the pods. The dynamicStableScale option trades that cost for a slower abort.

A canary is only as good as the check that stops it

A canary that a human watches on a dashboard is a slow rolling update.

The value comes from an automated check that aborts the rollout. In Argo Rollouts that is an AnalysisTemplate: a Prometheus query, a success condition, and a limit of failed measurements.

Which metrics? Google's advice is to start from your service level indicators (SLIs): HTTP error codes and response latency. CPU usage makes a noisy canary.

(If you have no SLIs yet, my guide on SLO vs SLA vs SLI starts there.)

How big and how long? AWS suggests 5% to 10% of traffic for 10 to 30 minutes in its ECS guidance. Google adds one rule I like: the more often you deploy, the shorter the canary. At 20 deploys a day it has to be far shorter than at 1 a week.

Use it when: you have enough traffic for 5% to mean something, and 2 metrics you would bet a release on.

Skip it when: the service gets 3 requests a minute, or it is a queue worker. Argo's docs say plainly that canary does not work for queue workers.

Shadow: copy real traffic to the new version

A shadow deployment (also called traffic mirroring) sends a copy of each live request to the new version.

The user gets the answer from the old version. The answer from the new one is thrown away.

So you learn how the new version behaves under real load, and no user can see a bug in it.

In Istio it is 2 fields on a VirtualService: mirror and mirrorPercentage. The Gateway API has a RequestMirror filter, with Extended support, so check that your gateway supports it.

Use it when:

  • You rewrote a service and want to compare latency and errors before anyone depends on it
  • You are changing a database, a runtime or a major dependency

The rule: mirror reads freely, and think hard before you mirror writes.

A mirrored "create order" request creates a second order unless the shadow copy writes to its own database and sends no emails. Flagger's docs give the same warning: mirror only requests that can be processed twice.

Shadow is a test under production load. You still need 1 of the other strategies to release.

Feature flags: deploy the code, release it later

A feature flag is an if statement around new behavior, with a switch you can change without a deploy.

You deploy the code switched off, with any strategy above. You release by turning the flag on for 1% of users, then 10%, then everyone.

What a flag gives you that no deployment strategy does:

  • A rollback in seconds: no pods, no pipeline, no router
  • A cohort you choose: your own team, 1 customer, 1 country
  • A release on the product team's schedule: the code shipped last week

What it costs: every flag is a second code path to test and a line to delete later.

Pete Hodgson's rule on martinfowler.com is the one I use: a release flag should live a week or two. A flag that is 6 months old is a config option nobody decided to have.

A flag cannot protect you from a bad migration, a bad base image or a memory leak in the new build. Those arrive with the deploy, flag on or off.

So: flags for features, a deployment strategy for the build.

A/B testing is an experiment

Many lists count A/B testing as the seventh deployment strategy. I leave it out.

The plumbing is the same as a canary: 2 versions, a traffic split. The question is different.

  • Canary: "Is this version broken?" Answered in minutes or hours
  • A/B test: "Does this version sell more?" Answered in days, when the numbers are significant

Run them as 1 rollout and each one ruins the other. The canary wants to finish fast, and the experiment wants a stable group of users for a week.

Ship the build with a canary. Run the experiment with a flag.

The database decides if you can roll back

Every strategy above assumes the old version still works after the new one has run. The database is where that assumption breaks.

The classic failure:

The new version renames a column

→ the migration runs

→ the canary looks bad

→ you roll back

→ the old version asks for a column that no longer exists

Your instant rollback now needs a second migration, written during an incident.

The fix is a pattern called expand and contract (or parallel change). Every breaking schema change becomes 3 deploys:

  1. Expand: add the new column next to the old one. Write to both
  2. Migrate: copy the old data over. Move every reader to the new column
  3. Contract: remove the old column, once nothing reads it

Expand and contract in 3 steps: expand adds the new column, migrate copies the old data over, contract removes the old column
Expand and contract: 3 deploys for 1 breaking schema change.

After step 1, old and new versions both work against the same schema. So a rolling update is safe, a canary is safe, and a rollback is safe.

The rule: a migration ships in its own deploy, before the code that needs it, and never removes anything the running version uses.

Do the contract step. A half-finished expand and contract leaves you with 2 columns and a team that is afraid of both.

Know what your platform gives you built in

You may already own more of this than you think. Amazon ECS added blue/green in July 2025 and linear and canary in October 2025, so the ECS section of most guides is out of date.

Platform Built in Worth knowing
Kubernetes Deployment Rolling update, Recreate No automatic rollback. 10 old revisions kept by default
Argo Rollouts Blue/green, canary Automated analysis and abort. Replaces or wraps the Deployment object
Flagger Canary, A/B, blue/green, mirroring Keeps your Deployment and runs a primary copy of it. Part of the Flux family
Amazon ECS Rolling, blue/green, linear, canary All 4 are native now. AWS recommends the native blue/green over CodeDeploy
AWS Lambda Weighted aliases, CodeDeploy canary and linear An alias splits traffic between 2 versions

3 details for AWS users:

  • ECS rolling defaults are 100% and 200%: minimumHealthyPercent 100, maximumPercent 200. With 4 tasks, ECS can start 4 new ones before it stops any old one
  • Turn on the circuit breaker with rollback: it stops a rolling deployment whose tasks cannot start or fail their health checks, and returns to the last completed one
  • ECS canary scales the new version to 100% first: so it costs the same capacity as blue/green
aws ecs update-service --cluster prod --service api \ --deployment-configuration "deploymentCircuitBreaker={enable=true,rollback=true}" 

On Lambda, a weighted alias is a canary in 1 command. This one sends 3% of traffic to version 2:

aws lambda create-alias \ --name routing-alias \ --function-name my-function \ --function-version 1 \ --routing-config AdditionalVersionWeights={"2"=0.03} 

Pick by what a bad release costs you

Teams pick a strategy by what sounds advanced. Pick by 1 question instead: what does 10 minutes of a broken release cost?

My rule, in 3 stages:

  1. It costs an apology: rolling update with maxUnavailable 0, a readiness probe, and flags on risky features. This is where 9 out of 10 startups should be
  2. It costs money or a customer: blue/green with manual promotion and a 10 minute window to switch back
  3. It costs money and you deploy many times a day: canary with automated analysis, because nobody can babysit 20 switches a day

Each stage keeps what the one before it built. Probes, expand and contract, and flags are needed at all 3.

How do you know you are ready for stage 3? You can name the 2 metrics that would abort a rollout, and you trust them enough to let them do it at 3 AM.

If you cannot, a canary gives you more YAML and the same risk.

Avoid the 6 mistakes I keep seeing

  1. No readiness probe: every strategy on Kubernetes trusts it. Without one, a rolling update replaces healthy pods with broken ones
  2. A rollback nobody has run: if the first time is during an incident, it is a second incident. Run it once a quarter on purpose
  3. A migration inside the deploy: the schema changes, the rollback breaks. Expand first
  4. Blue/green with the defaults: automatic promotion and a 30 second window is a rolling update that costs double
  5. A canary on 3 replicas: the smallest step is a quarter of your users or more
  6. Flags that never die: 40 old flags = 40 code paths nobody tests

Check these before your next release

Always:

  • Every service has a readiness probe that checks something real
  • maxUnavailable is 0 on anything users call
  • The pipeline waits on the rollout status and fails when it fails
  • The rollback command is written down, and someone ran it this quarter
  • Schema changes ship before the code, and remove nothing in the same deploy
  • Risky features sit behind a flag with an owner and a removal date
  • You know your extra capacity during a deploy: 25%, or 100%
  • If you run a canary: the abort is automatic and based on errors and latency

Deployment strategies FAQ

What is a deployment strategy?

It is the way you replace a running version of your software with a new one. It decides who gets the new version first, how much extra capacity you pay for, and how you go back.

What are the main types of deployment strategies?

6: recreate, rolling update, blue/green, canary, shadow and feature flags. The first 5 change how the code is deployed, and feature flags change when users see it.

What is the difference between blue/green and canary?

Blue/green switches all users at once to a version that was tested with no traffic. Canary moves a small share of real users first and grows it. Blue/green is simpler and costs double capacity. Canary limits the damage and needs metrics you trust.

What is the default deployment strategy in Kubernetes?

RollingUpdate, with maxSurge and maxUnavailable both at 25%. The only other built-in type is Recreate. Blue/green and canary need a tool such as Argo Rollouts or Flagger.

Which deployment strategy has zero downtime?

All of them except recreate, if the app has a readiness probe, handles shutdown cleanly and works with both the old and the new schema. A rolling update with maxUnavailable 0 is the cheapest way to get there.

Which deployment strategy is the safest?

A canary with automated analysis exposes the fewest users to a bad version. It is only safer than blue/green when the checks are automatic. A feature flag is the fastest to undo.

Is A/B testing a deployment strategy?

I say no. It uses the same traffic split as a canary, to answer a product question over days. A deployment strategy answers "is it broken" in minutes.

A recap

If you take away 1 thing, let it be this: choose the strategy by what a rollback is, and practice the rollback.

  • Deploy and release are 2 steps. Flags separate them
  • Rolling update first, with maxUnavailable 0 and a readiness probe
  • Blue/green when a bad release is expensive, with manual promotion
  • Canary when the abort is automatic
  • Expand and contract on every breaking schema change

You don't NEED a DevOps expert for this. The manifest and the checklist above cover the first stage, and the Argo Rollouts guide covers the next 2.

If you would rather have a senior engineer look at your pipeline and tell you what to fix first, the free assessment is an hour of exactly that.