4.2.13.5 HEALTHCHECK Orchestrator Signal
A focused guide to HEALTHCHECK Orchestrator Signal, connecting core concepts with practical Docker and container operations.
HEALTHCHECK orchestrator signal refers to how the health status HEALTHCHECK produces becomes a meaningful input to orchestrators and other automation, used to decide whether to restart a container, hold off on routing traffic to it, or treat it as a failure during a rolling deployment.
Orchestrators Acting on Health Status
Beyond what plain Docker reports, orchestrators such as Kubernetes or Docker Swarm use health signals (their own probes, or in some cases information derived from container health) to make scheduling and traffic-routing decisions automatically.
docker service create --health-cmd "curl -f http://localhost:8080/health || exit 1" \
--health-interval=30s --health-retries=3 myapp:1.0
A Swarm service configured this way allows the orchestrator to detect and replace unhealthy task instances automatically.
Preventing Traffic to Unhealthy Instances
A core benefit of integrating health checks with orchestration is that traffic can be withheld from instances reported as unhealthy, preventing users from being routed to a container that is running but not actually able to serve requests correctly.
docker service ps myapp
This reports the health status of each replica, information the orchestrator uses internally to decide which replicas are eligible to receive traffic.
Health Checks During Rolling Deployments
During a rolling update, an orchestrator can use health check results to confirm a newly deployed replica is actually healthy before proceeding to update the next one, preventing a bad deployment from being rolled out to an entire service before the problem is detected.
docker service update --image myapp:1.1 --update-order start-first myapp
Starting the new version before stopping the old one, combined with health check verification, allows the orchestrator to catch issues with the new version before committing to replacing every existing instance.
Why This Integration Matters
A health check that exists only to be displayed in docker ps, without being connected to any actual automated decision-making, provides far less value than one that orchestration tooling actively uses to make real operational decisions — designing health checks with this downstream consumption in mind is what makes them genuinely useful in production.
docker inspect myapp --format '{{.State.Health.Status}}'