Health check

A small repeated test that tells a load balancer whether a server is healthy enough to keep receiving traffic.

how does the load balancer know a server is downping my server before sending users therestop traffic going to the broken machineis this backend still aliveserver heartbeat endpointwhy do people still get sent to the crashed serverheath checkthat /healthz URL everyone seems to add

See it

Live demo coming soon

What it is

A health check is a repeated probe that asks whether an origin can receive traffic. A load balancer might request /healthz every few seconds and remove the origin after several failures, then add it back after several successful responses.

Reach for one whenever traffic can go to more than one server or region. Kubernetes is where the vocabulary got standardized: a liveness probe proves the process can still answer and restarts it when it cannot, a readiness probe decides whether the instance should receive requests yet, and a startup probe holds the other two off while a slow process boots. The '/healthz' spelling is a Google convention that came along with it.

A check that always returns 200 can bless a broken server. A check that queries every dependency can cause the opposite problem: one slow database makes every otherwise useful server fail at once. Keep the probe bounded, set failure thresholds, and test what failure actually removes from traffic.

Ask AI for it

Add an unauthenticated GET /healthz endpoint for an AWS Application Load Balancer target group. Return 200 only after startup is complete, perform no writes, cap dependency checks at 500ms, and return 503 when the instance is not ready. Configure the ALB health check path as /healthz, the success matcher as 200, a 10-second interval, an unhealthy threshold of 3, and a healthy threshold of 2.

You might have meant

load balancerorigin serverautoscalingregion multi regioncold start