Hosting & Deployment

Define Deployment Health Checks and Automated Rollbacks

Use startup, readiness, and post-deployment signals to verify releases and trigger safe recovery when necessary.

A successful deployment command does not prove that users can use the new version. Health checks should verify that the application is ready and that critical behavior remains healthy after release.

Separate health concepts

A liveness check indicates whether a process should be restarted. A readiness check indicates whether it can receive traffic. A startup check allows slow initialization without premature restarts. Avoid making liveness depend on every external service, which can cause restart loops during a provider outage.

Verify after deployment

Run smoke tests against critical endpoints and workflows. Compare error rate, latency, queue behavior, and dependency health with the pre-deployment baseline.

Define rollback criteria

Automated rollback should rely on clear signals and a known-good artifact. Consider database compatibility, background jobs, and irreversible side effects before rolling back code. Sometimes disabling a feature or deploying a forward fix is safer.

Checklist

  • Define liveness, readiness, and startup separately.
  • Run critical smoke tests after deployment.
  • Compare health against a baseline.
  • Define rollback signals and safe conditions.
  • Include database and job compatibility in recovery plans.
Share this page Help other developers discover this resource.