🗓️ 08042026 1500

DEPLOYMENT STRATEGIES

What it is:

  • The different approaches to releasing a new version of your application to production
  • Each strategy trades off between speed, safety, cost, and complexity

Why it matters:

  • The wrong strategy for your situation means either unnecessary downtime, wasted infrastructure cost, or undetected bugs reaching all users
  • Understanding the trade-offs lets you pick the right one for your scale and risk tolerance

Strategy Comparison​

StrategyDowntimeRollback speedInfra costMixed versionsBlast radius
RecreateYesSlow (redeploy)1xNo100%
rolling_deploymentNoMedium (reverse roll)1xYesGradual
blue_green_deploymentNoInstant (switch back)2x during deployNo100% on switch
canary_deploymentNoFast (reroute)~1x + canaryYes (controlled)Small → gradual
Shadow/darkNoN/A (no user impact)2xN/A0%

Recreate (Big-Bang)​

  • Stop all old instances, deploy new, start them
  • Simplest strategy — no mixed versions, no routing complexity
  • Has downtime — only acceptable when maintenance windows exist or the app can't run two versions simultaneously
  • Use for: internal tools, batch processing jobs, apps with incompatible version transitions

Shadow / Dark Launch​

  • New version receives a copy of real traffic but responses are discarded
  • Users only see responses from the old version
  • Purpose: test new version's performance and correctness under real load without user impact
  • Use for: major rewrites, new infrastructure, performance-critical systems
  • Requires infrastructure to duplicate and route traffic

Decision Guide​

Start with: what can you afford?​

Single server, small team:

  • rolling_deployment or recreate
  • Minimal infrastructure overhead
  • Rolling gives you zero-downtime; recreate if you can tolerate a maintenance window

Need instant rollback:

  • blue_green_deployment
  • Worth the 2x cost during deployment if rollback speed is critical (payments, financial services)

High traffic, need safety:

  • canary_deployment
  • Requires monitoring and traffic-splitting infrastructure
  • Best blast-radius control

Major rewrite, high risk:

  • Shadow/dark launch first, then canary
  • Validate under real load before any user sees the new version

For your multi-client Docker setup​

WARNING

All zero-downtime strategies require backward-compatible database migrations: If your new version needs schema changes that break the old version, no deployment strategy can save you. Always decouple schema migrations from code deployments — migrate first, deploy second.


References​