TL;DR
  • Blue-green: safest for stateless services, expensive for stateful
  • Canary: best for risky changes, requires good metrics
  • Rolling: fine for low-risk updates, not for schema changes
  • Always ship backward-compatible migrations
  • Health checks lie — synthetic smoke tests tell the truth

Zero-downtime deployment isn’t a single technique — it’s a discipline. You need the right strategy for the change, and the discipline to never ship something that breaks the discipline.

Phase 01 · Choose the strategy

Match deployment pattern to risk profile

Blue-green for stateless services on predictable hardware. Canary for any change where you can’t fully predict impact (new algorithms, ML models, major UX changes). Rolling for low-risk patches where you’re confident in backward compatibility.

Phase 02 · Schema migrations

Expand-contract, always

Never ship a migration that breaks the old version. Add columns, don’t rename. Write to both old and new until you’re sure the old can go. Then remove. This turns scary schema changes into boring two-week rollouts.

  • Expand: add new schema, write to both locations
  • Migrate: backfill old data into new schema
  • Switch: flip reads to new schema
  • Contract: drop old schema once everyone is off it
Phase 03 · Health checks

Real health checks, not 200 OK

An endpoint returning 200 doesn’t mean the service is healthy. It means the HTTP layer works. Real health checks exercise the database connection, downstream dependencies, and a critical-path query. If your health check can pass while your service is broken, it’s not a health check.

Phase 04 · Rollback

Faster than roll-forward

Your rollback path should be faster and better-tested than your deploy path. If rollback takes 30 minutes, you’ll avoid doing it and try to hotfix. That’s when incidents become outages.

This is how we run every deploy under Systems Integration. Zero-downtime deploys aren’t a feature — they’re a baseline.