Zero-Downtime Deploys for Small Teams
Blue-green and rolling deploys without a platform team.
The Problem
Small teams still need deploys that do not drop traffic. Zero-downtime deployment is mostly about readiness, compatibility, health checks, and rollback speed.
Why It Matters
Users do not care whether the team has a platform group. They care that deploys do not break checkout, dashboards, login, or background processing. Small teams can get most of the benefit with simple patterns applied consistently.
Heroku, Render, Fly.io, Vercel, Kubernetes, ECS, and Cloud Run all support some form of rolling or replacement deploy. The application still has to be compatible with that deployment model.
Project Example
A two-person team running a Next.js app and API can use rolling deploys if each instance becomes ready only after boot, new code remains compatible with the current database schema, and old instances can finish requests during shutdown.
Deployment Flow
1. Build immutable artifact.
2. Start new instance.
3. Wait for readiness to pass.
4. Route a small amount of traffic.
5. Watch errors and latency.
6. Drain old instance gracefully.
7. Keep rollback command ready.
This is enough for many products before blue-green deployment is necessary.
Implementation Checklist
- Add readiness checks that reflect real traffic readiness.
- Keep schema changes backward compatible.
- Use graceful shutdown for in-flight requests.
- Deploy one instance or small batch at a time.
- Keep rollback as a one-command operation.
- Separate deploy from release with feature flags.
- Run smoke tests against the new version before full traffic.
- Track deploy markers in logs and metrics.
Production Notes
The hardest part is usually database compatibility. Use expand-contract migrations: add new schema first, deploy compatible code, backfill, switch reads, and remove old schema later.
For background workers, zero downtime also means no duplicate processing and no job loss. Use idempotency keys and graceful worker shutdown.
Common Mistakes
- Deploying schema-breaking changes before code is ready.
- Marking a pod ready before caches and connections are initialized.
- Rolling all instances at once.
- Testing rollback only after production fails.
- Forgetting long-running jobs during API-focused deploy plans.
- Treating a green build as proof that production is ready.
Summary
Zero downtime does not require a large platform team. It requires careful compatibility, health checks, and a rollback path that has already been tested.
The weekly engineering digest
Production-grade engineering writing in your inbox. No spam, unsubscribe anytime.