Git, CI/CD & GitOpsLVIII · Deployment StrategiesTaxonomy
The deployment pattern taxonomy — five patterns, four trade-off axes
What you'll learn
- Name the five standard deployment patterns and what each replaces
- Identify the four trade-off axes (availability, rollback speed, cost, blast radius) and how each pattern scores on each
- Recognise that the pattern choice is constrained by data compatibility, not only by traffic shape
- Read the taxonomy as a decision framework, not as a ranking of good and bad
Prerequisites
Verified against Git 2.55.x teaching target; 2.40+ minimum · GitHub Actions continuous service; Aug 2026 documentation baseline · Argo CD v3.5.x teaching target; v3.0+ minimum · Flux v2.9.x · Sigstore Cosign v3.1.x · SLSA v1.2 · OCI Distribution Specification v1.1 · Git LFS v3.7.1 · Kubernetes (cross-course target) 1.36.x
A deployment pattern is the answer to a single question: how do old and new versions of a service coexist during the release? Five answers have survived in production: recreate, rolling update, blue-green, canary, and A/B. Each trades off availability, rollback speed, infrastructure cost, and blast radius against the others. Picking a pattern is not picking a favourite; it is matching the change’s data compatibility and risk tolerance to a point in the trade-off space.
The five patterns
flowchart LR
A["Pattern taxonomy"] --> B["Recreate"]
A --> C["Rolling update"]
A --> D["Blue-green"]
A --> E["Canary"]
A --> F["A/B / shadow"]
- Recreate. The old version is stopped, then the new version is started. There is a window during which no version is serving traffic.
- Rolling update. The old version is replaced incrementally. Old and new coexist during the rollout, sharing the load.
- Blue-green. A second, identical environment is deployed with the new version. Traffic is switched at the load balancer from old (blue) to new (green) at a single moment.
- Canary. A small fraction of traffic is routed to the new version. If metrics hold, the fraction is increased in steps until the new version takes 100%.
- A/B / shadow. Traffic is split by user attribute (A/B) or mirrored to the new version without returning its responses (shadow). Used to compare behaviour or validate under real load without user impact.
The names are conventional but not universal; the tools (Argo Rollouts, Flagger, Spinnaker) sometimes use different terms for similar mechanics. Read the mechanics, not the name.
The four trade-off axes
Every pattern can be scored on the same four axes:
- Availability during rollout. Does traffic keep flowing, and does the user see errors?
- Rollback speed. How fast can the change be reverted when something goes wrong?
- Infrastructure cost. Does the pattern double the fleet, keep it the same, or temporarily exceed it?
- Blast radius. When the new version is broken, how many users see the break?
Recreate is cheapest on infrastructure and fastest on rollback (to the prior state) but produces the worst availability during the rollout. Blue-green is best on rollback (a single load balancer flip) but doubles the fleet. Canary is best on blast radius (1% of traffic first) but slowest to complete. Rolling update is the compromise: no fleet doubling, no full downtime, gradual rollout, and the new version must coexist with the old.
The hidden axis: data compatibility
The fifth constraint that does not appear in the trade-off matrix is data compatibility. Old and new versions of a service often share a database, a message queue, or a downstream API. The deployment pattern must allow that shared resource to be in a state both versions can read and write to during the rollout.
flowchart TD
A["Pattern choice"] --> B["Traffic shape fits?"]
A --> C["Data compatible?"]
A --> D["Rollback simple?"]
A --> E["Cost acceptable?"]
A blue-green deploy of a service that owns a database schema change is not safe: at the flip moment, the new version writes to a schema the old version cannot read. The pattern choice must account for the migration order, the dual-write window, and the schema’s backward compatibility. Rolling update and canary demand forward-and-backward compatibility during the coexistence window. Blue-green relaxes that constraint if the switch is atomic, but only if the database layer is shared.
Production discipline
- Choose the pattern after the data migration is designed. Traffic shape is the second question, not the first.
- Score every pattern on the same four axes. A pattern that scores well on availability but cannot roll back is a pattern that turns a routine incident into a long one.
- Treat “we always use rolling update” as a smell. It is the default for stateless services and the wrong default for data-heavy services with breaking schemas.
- Match the tool to the pattern. Kubernetes Deployment is rolling update and recreate only; Argo Rollouts and Flagger add canary and blue-green.
Cross-course references
- Kubernetes for Production Sysadmins - Parts XIV (Workloads) and XXII (Updates) cover the native Deployment rolling strategy and its limits.
- This course, Part LVII-04 (Pull request approvals) covers the change-side gate that runs before any of these patterns.
- This course, Part LVIII-02 through LVIII-05 cover the four common patterns in detail.
Quiz
Knowledge check · 4 questions
Q1. A team picks blue-green because the rollback is a single load balancer flip. The release ships a schema change. At the flip moment the new version writes to a column the old version cannot read. What was missed in the pattern choice?
Q2. The four canonical trade-off axes (availability, rollback speed, cost, blast radius) are not sufficient to choose a deployment pattern; data compatibility can be solved later with a migration script.
Q3. Name the five standard deployment patterns and the four trade-off axes along which they differ.
Q4. Diagnose which trade-off a team misjudged when its 'always rolling update' policy caused a production incident.
A platform team mandates rolling update as the standard pattern across all services because it is the Kubernetes default and doubles no fleet. A stateless API service follows the policy cleanly. A payments service also follows it: during the rollout, the new version writes a new column to a shared orders table. The old version, still serving traffic, reads the table without the column and overwrites it with the original schema, dropping the new field. After the rollout completes, the new column is empty for orders touched during the window. The team discovers the data loss in a reconciliation job the next morning. They roll back, but the data loss has already happened.
Passing score: 75%. Answers are checked in this browser.