Concept
Why Deployment Strategy Matters
Shipping change without breaking production
A deployment strategy is how you replace the running version of a service with a new one. The naive approach — stop everything, swap the binary, start again — causes user-visible downtime and offers no safe way back if the new build is broken. Modern strategies optimise for three goals: zero downtime, fast rollback, and limited blast radius (how many users a bad release can hurt).
The four strategies you must know are:
- Recreate — kill the old version, start the new one. Simple, but causes downtime.
- Rolling update — replace instances in small batches so the service stays up throughout.
- Blue-green — run two identical environments and flip all traffic from one to the other instantly.
- Canary — send a small percentage of traffic to the new version, watch metrics, then ramp up.
A key mental model for interviews: deploy (getting new code onto servers) and release (exposing it to users) are separate concerns. Feature flags let you deploy code dark and release it later — independently of which deployment strategy you use.