Understand the trade-offs between risk, cost, and complexity. Certification scenarios commonly ask you to select the best strategy given downtime tolerance, resource budget, and rollback requirements.

- Deployment target: where the new version runs (same instances, new instances, or a separate environment).
- Traffic routing: how users reach the new version (load balancer, service mesh, DNS).
- Health checking: how you validate the new version (local probes, integration checks, or percentage-based canaries).
- Rollback mechanism: how you recover when a rollout fails (automated rollback, manual reversion, or traffic re-routing).

Rolling (in-place) deployments
- Replace instances incrementally (one-by-one or in small batches).
- Uses existing capacity; no duplicate environment required.
- Built-in safety: you can pause and resume the update on health-check failures.
- Kubernetes Deployments use rolling updates by default.
maxUnavailableandmaxSurge— how many pods can be unavailable or created during updates.- Readiness and liveness probes, timeouts, and inter-batch delays.
- SLA-based sizing: if an SLA requires 80% capacity, calculate
maxUnavailableaccordingly.

Blue-Green deployments
- Maintain two full environments: Blue (current) and Green (new).
- Validate Green, then switch traffic to Green; revert to Blue if problems occur.
- Extremely low runtime risk because cut-over only happens after testing.
- Requires roughly double capacity while both environments run.
- Ideal for major releases, schema changes, and risky integrations.
- Databases and stateful services complicate blue-green: replicating very large DBs or maintaining multi-version migrations may be impractical.
Blue-green simplifies runtime rollback but can introduce complexity for stateful components and database migrations. Plan migration strategies (backfills, feature toggles, or compatibility layers) before switching environments.




Canary deployments
- Canary deploys expose a small subset of users to the new version while monitoring metrics (error rate, latency, business KPIs).
- Start small (e.g., 5%) and increase traffic based on observed health.
- Modes:
- Pure canary: a small percent, validate, then cut over or revert.
- Progressive/linear canary: increase traffic in steps (e.g., 5% → 10% → 25% → 100%) with checks at each step.



Recreate (stop-and-redeploy)
- Destroy all existing instances, then start new ones with the updated version.
- Simple to implement; usually incurs brief downtime.
- Rollback is a straightforward redeploy of the previous release.
- Maintenance windows, development/test environments, or emergency fixes where short interruption is acceptable.

A/B testing and feature flags
- A/B testing is a business experimentation pattern: expose features to segments and measure metrics (conversion, retention).
- Not strictly a deployment strategy, but often combined with deployments: deploy code dark and toggle features via flags.
- Feature flags enable targeted rollouts, instant rollback by toggling off, and experimentation without redeploying.



Other patterns (brief)
- Ring deployments: progressive rollout across user cohorts (canary-like but organized as rings).
- Regional rollouts: deploy by geography to limit blast radius.
- Shadowing: send production traffic copies to a new version without affecting users (for correctness and performance testing).
- Chaos/failure testing: intentionally induce faults to validate resilience.
Decision factors — which strategy to choose?
- Rolling: low resource cost, moderate complexity; suitable when capacity is constrained.
- Blue-Green: low runtime risk, high resource cost; recommended for major releases and migrations.
- Canary: best for minimizing risk and enabling data-driven rollouts; requires observability and automation.
- Recreate: simplest, causes downtime; acceptable for non-critical services or scheduled maintenance.

Platform engineering perspective
- Platform teams should expose these strategies as self-service capabilities — opinionated, automated pipelines and orchestration — so developers can deploy safely without manual operations.
- This is core to DevOps evolution: make complex operations simple services.
Summary — key takeaways
- Know the essentials: Rolling (in-place), Blue-Green, and Canary. Recreate and variations (rings, regional, shadowing) are useful in specific contexts.
- Choose based on trade-offs: downtime tolerance, resource cost, complexity, and rollback needs.
- Feature flags and A/B testing decouple release from deployment and enable targeted experiments and instant rollback without redeploying.
- Platform teams should standardize and automate these strategies so teams can ship fast, safely, and cost-effectively.

Quick comparison table
Links and references
- Kubernetes Deployments and rolling updates
- Kubernetes Probes: readiness & liveness
- Argo Rollouts — progressive delivery for Kubernetes
- Argo CD and Argo Workflows