A health check is a mechanism for verifying that a service is running correctly and able to serve requests. Most commonly, it is implemented as a dedicated HTTP endpoint (e.g., /health or /healthz) that returns a status code indicating whether the service and its critical dependencies are healthy.
Health checks come in two varieties: shallow (liveness) checks that simply confirm the process is running and can respond to HTTP requests, and deep (readiness) checks that verify connectivity to databases, caches, message queues, and other dependencies the service needs to function properly.
Health checks are used by load balancers to route traffic away from unhealthy instances, by container orchestrators like Kubernetes to restart failing pods, and by monitoring services like Hyperping to detect when a service becomes unavailable. Implementing robust health checks is one of the simplest and most impactful reliability improvements a team can make.