← Workflows

阅读中文版本

Zero Downtime Deploy Verify Workflow

Deploy an update with zero downtime using rolling updates and verify health checks during the transition.

intermediate~40 mindeploymentzero-downtimeworkflow

Objective

Deploy an application update without any user-visible downtime.

Environment

  • A deployment system supporting rolling updates
  • Health check endpoints on the application
  • Sufficient capacity to run old and new versions simultaneously

Steps

1. Verify health checks

Confirm that health check endpoints are working on the current version.

Expected state: Health checks are responding correctly.

2. Start rolling update

Initiate a rolling deployment that replaces instances one at a time.

Expected state: The deployment begins replacing old instances with new ones.

3. Monitor health

Watch health check status for each new instance as it comes up.

Expected state: All new instances pass health checks before receiving traffic.

4. Verify no dropped requests

Check that request success rate stays at 100 percent during the rollout.

Expected state: No requests are dropped during the deployment.

5. Complete deployment

Confirm all instances are running the new version and old instances are removed.

Expected state: The deployment completes with all new instances active.

Decision points

How many instances to keep old?

  • One at a time for safety
  • Multiple for speed

Replace one instance at a time for maximum safety; use surge deployment if you need to go faster.

Expected outcome

The application is updated with zero downtime and all health checks pass throughout the deployment.

Verification

Monitor request success rate during deployment; confirm no 502 or 503 errors occurred.

Cleanup

Roll back to the previous version if health checks fail for new instances.

Rolling updates keep serving while updating

By replacing instances one at a time, the application is always available. Health checks ensure each new instance is ready before it receives traffic.

Implementation Notes

This workflow provides a structured approach to ensure consistent results across team members and environments.

Common Pitfalls

Skipping verification steps or rushing through the process can lead to incomplete results. Always follow each step in order and verify before proceeding.

Quick Reference

# Execute the workflow steps as documented above
echo "Workflow completed successfully"