Production Readiness
Use this checklist before shipping Nimbus apps to production. It focuses on reliability, security, observability, and safe deployment workflows.
1) Core runtime safety
- Set
APP_ENV=productionand verify config is loaded from environment. - Run behind a reverse proxy (TLS termination, forwarded headers, request limits).
- Ensure graceful shutdown is configured for rolling deploys.
2) Database & migrations
- Run migrations in CI/staging before production rollout.
- Keep migrations small and reversible (
Up/Down). - For DDL that cannot run in transactions, mark migration as non-transactional and document rollback path.
- Never edit an already-applied migration in production.
Related: Migrations, Database
3) Queue reliability
- Use
QUEUE_DRIVER=redisordatabase(not sync) in production. - Set
QUEUE_BOOT_STRICT=trueso invalid queue config fails at boot. - Set
QUEUE_REDIS_VISIBILITY_TIMEOUT_SECONDS/QUEUE_DB_LEASE_SECONDSto at least 2x p95 job runtime. - Set bounded retries and keep job handlers idempotent.
- Run dedicated worker processes and monitor backlog growth.
4) Realtime security
- Configure explicit WebSocket / Presence / Reverb origin allowlists (
REVERB_ALLOWED_ORIGINS). - Authorize channels in Presence via
AuthFunc. - Avoid broad CORS rules unless absolutely necessary.
Related: WebSockets, Reverb, Presence, CORS
5) Health checks & observability
- Expose health endpoints for load balancers and orchestration probes (
/livez,/readyz, legacy/health). - Track queue counters (dispatch/processed/failed/retried/reclaimed).
- Alert on retry spikes, reclaim spikes, and sustained queue backlog.
# Horizon — Prometheus + JSON workloads (when RedisURL configured)
GET /horizon/api/metrics/prometheus
GET /horizon/api/workloads
# Reverb — liveness next to WebSocket path
GET /reverb/health
6) Release process
- Run CI gates on every PR: tests, race detector, and
go vet. - Require peer review for migration and queue-related changes.
- Roll out with staged deploys and rollback plan validated.
Pre-launch quick check
[ ] APP_ENV=production configured
[ ] Migrations tested in staging and rollback verified
[ ] Queue driver + lease timeouts configured
[ ] WebSocket/Presence allowed origins configured
[ ] Health and metrics endpoints reachable
[ ] Alerts configured for queue failures/retries/reclaims
[ ] CI checks passing on default branch
[ ] Deployment rollback plan documented