Choose a Deployment Strategy
Purpose
Select a rollout mechanism that matches the service's risk and constraints, with explicit promotion criteria and a rollback path, so releases stop being all-or-nothing events.
When to use
- A service is moving from maintenance windows to zero-downtime releases.
- A high-risk change needs progressive exposure.
- The team is debating blue-green versus canary versus feature flags.
When not to use
- The whole pipeline needs designing. Use
pipeline-design.
- The question is how to undo a specific release. Use
rollback-plan.
- The question is sequencing a multi-team release. Use
release-plan.
Inputs
Required:
- Service description: runtime platform, statefulness, traffic entry (load balancer, gateway, mesh, client apps), database coupling.
- Business tolerance: acceptable downtime and user-visible error budget during release.
Optional, improves quality:
- Traffic volume (needed for canary statistical meaning), SLOs, available metrics.
- Infrastructure budget (blue-green doubles capacity temporarily).
- Existing feature flag capability, session handling, backward compatibility of APIs and schema.
If the platform or the downtime tolerance is unknown, ask. Other gaps become open questions.
Process
- Establish constraints: can two versions run at once? Are the API and database schema backward compatible? Are there sticky sessions, long-lived connections, background consumers or singleton jobs?
- If two versions cannot coexist, first plan expand-and-contract for schema and API changes; otherwise only recreate is safe.
- Evaluate candidates against: downtime, blast radius, rollback time, infrastructure cost, traffic-control requirement, observability requirement, operational complexity.
- Check canary feasibility: enough traffic to detect a regression within the step duration; per-version metrics available.
- Separate deploy from release: decide whether feature flags should gate user exposure independently of binaries.
- Define promotion steps (e.g. 1% → 10% → 50% → 100%) with duration and automated analysis criteria (error rate, latency percentiles, saturation, business KPI).
- Define abort criteria and the rollback mechanism per strategy (traffic switch, rollout undo, flag off).
- Address stateful parts: queue consumers, scheduled jobs, caches, migrations; state who runs them during overlap.
- Recommend one strategy (or combination) with rationale and prerequisites to build.
- Label every inference
[ASSUMPTION] and move unsupported items to open questions. If the goal continues, suggest rollback-plan for the detailed undo path, release-plan for sequencing the release, or slo-definition if promotion criteria lack agreed SLOs.
Output format
# Deployment Strategy: <service>
## Constraints
- Version coexistence: yes/no – reason
- Schema/API compatibility: ...
## Options Compared
| Strategy | Downtime | Blast radius | Rollback time | Extra cost | Prerequisites | Fit |
## Recommendation
<strategy> because ...
## Rollout Steps
| Step | Exposure | Duration | Promote if | Abort if |
## Rollback Mechanism
## Stateful Components During Overlap
## Prerequisites / Open Questions
Quality checklist
Common pitfalls
- Choosing blue-green while sharing one database with a breaking migration. Use expand-and-contract first.
- Canary with low traffic, where 1% means a handful of requests. Use longer steps or synthetic traffic.
- Rolling back binaries while a feature flag or data migration has already changed state. Plan both.
Example
Input: "Payment API on Kubernetes behind an ingress, ~300 rps, 20-minute maintenance window today, schema changes every few releases."
Excerpt of output:
- Recommendation: canary via weighted routing, combined with expand-and-contract migrations and feature flags for new payment methods.
- Step 1: 5% for 15 min; promote if 5xx rate and p99 latency of canary are not worse than stable by more than
[TBD]; abort on any payment-authorization error spike.
1---2name: deployment-strategy3description: "Recommends a deployment strategy (recreate, rolling, blue-green, canary, shadow, feature flags or a combination) for a specific service by weighing risk, statefulness, database changes, traffic control, cost and rollback speed. Use when a team must decide how a release reaches users, or when current releases cause downtime or risky big-bang cutovers."4license: MIT5metadata:6 source: https://skillmd.com/skills/muratdincer/deployment-strategy7 version: "1.0.0"8 language: en9 category: 07-devops-sre10 role: devops-engineer11 area: cicd12 title: "Choose a deployment strategy"13 related: "pipeline-design, rollback-plan, release-plan, schema-migration-plan, slo-definition"14 prompt: "We deploy our payment service with a 20-minute maintenance window. Which deployment strategy should we move to so we get zero downtime?"15---1617# Choose a Deployment Strategy1819## Purpose20Select a rollout mechanism that matches the service's risk and constraints, with explicit promotion criteria and a rollback path, so releases stop being all-or-nothing events.2122## When to use23- A service is moving from maintenance windows to zero-downtime releases.24- A high-risk change needs progressive exposure.25- The team is debating blue-green versus canary versus feature flags.2627## When not to use28- The whole pipeline needs designing. Use `pipeline-design`.29- The question is how to undo a specific release. Use `rollback-plan`.30- The question is sequencing a multi-team release. Use `release-plan`.3132## Inputs33Required:34- Service description: runtime platform, statefulness, traffic entry (load balancer, gateway, mesh, client apps), database coupling.35- Business tolerance: acceptable downtime and user-visible error budget during release.3637Optional, improves quality:38- Traffic volume (needed for canary statistical meaning), SLOs, available metrics.39- Infrastructure budget (blue-green doubles capacity temporarily).40- Existing feature flag capability, session handling, backward compatibility of APIs and schema.4142If the platform or the downtime tolerance is unknown, ask. Other gaps become open questions.4344## Process451. Establish constraints: can two versions run at once? Are the API and database schema backward compatible? Are there sticky sessions, long-lived connections, background consumers or singleton jobs?462. If two versions cannot coexist, first plan expand-and-contract for schema and API changes; otherwise only recreate is safe.473. Evaluate candidates against: downtime, blast radius, rollback time, infrastructure cost, traffic-control requirement, observability requirement, operational complexity.484. Check canary feasibility: enough traffic to detect a regression within the step duration; per-version metrics available.495. Separate deploy from release: decide whether feature flags should gate user exposure independently of binaries.506. Define promotion steps (e.g. 1% → 10% → 50% → 100%) with duration and automated analysis criteria (error rate, latency percentiles, saturation, business KPI).517. Define abort criteria and the rollback mechanism per strategy (traffic switch, rollout undo, flag off).528. Address stateful parts: queue consumers, scheduled jobs, caches, migrations; state who runs them during overlap.539. Recommend one strategy (or combination) with rationale and prerequisites to build.5410. Label every inference `[ASSUMPTION]` and move unsupported items to open questions. If the goal continues, suggest `rollback-plan` for the detailed undo path, `release-plan` for sequencing the release, or `slo-definition` if promotion criteria lack agreed SLOs.5556## Output format57```markdown58# Deployment Strategy: <service>59## Constraints60- Version coexistence: yes/no – reason61- Schema/API compatibility: ...62## Options Compared63| Strategy | Downtime | Blast radius | Rollback time | Extra cost | Prerequisites | Fit |64## Recommendation65<strategy> because ...66## Rollout Steps67| Step | Exposure | Duration | Promote if | Abort if |68## Rollback Mechanism69## Stateful Components During Overlap70## Prerequisites / Open Questions71```7273## Quality checklist74- [ ] Version coexistence and schema compatibility were checked before recommending a non-recreate strategy.75- [ ] Promotion and abort criteria are metric-based with thresholds or `[TBD]`.76- [ ] Canary is recommended only if traffic allows meaningful comparison.77- [ ] Background jobs and consumers are covered, not only HTTP traffic.78- [ ] Cost impact of duplicate capacity is stated qualitatively without invented numbers.79- [ ] All checks pass; if any fails, revise the output and re-run this checklist before answering.8081## Common pitfalls82- Choosing blue-green while sharing one database with a breaking migration. Use expand-and-contract first.83- Canary with low traffic, where 1% means a handful of requests. Use longer steps or synthetic traffic.84- Rolling back binaries while a feature flag or data migration has already changed state. Plan both.8586## Example87Input: "Payment API on Kubernetes behind an ingress, ~300 rps, 20-minute maintenance window today, schema changes every few releases."8889Excerpt of output:90- Recommendation: canary via weighted routing, combined with expand-and-contract migrations and feature flags for new payment methods.91- Step 1: 5% for 15 min; promote if 5xx rate and p99 latency of canary are not worse than stable by more than `[TBD]`; abort on any payment-authorization error spike.