Health check endpoint test

Sends one GET to a health URL and reports its status code, timing and body status, and whether a cache could be answering for the service. A health endpoint that says 200 from a stored copy keeps reporting healthy after the service stops.

Checker offline. Follow the manual steps below, they give the same answer.

What it checks

  • The status code. A 2xx passes, a 503 means the endpoint works and reports the service as unavailable, and any other 4xx or 5xx fails. When the URL redirects, the first code is shown next to the final one, because a probe that does not follow redirects sees only the first.
  • Time to the response headers and to the end of the body, from one request.
  • The Content-Type: application/json, application/health+json, or neither.
  • The top-level status field, read in the vocabulary of the IETF health check draft (pass, warn, fail) and of Spring Boot Actuator (UP, DOWN, OUT_OF_SERVICE, UNKNOWN). A body that says down or fail under a 2xx code fails, because a probe that reads only the code records the service as healthy.
  • Whether a cache served the response, from the Age, CF-Cache-Status, X-Cache, X-Cache-Status and Cache-Status headers.
  • Whether Cache-Control, Expires or a validator lets a shared cache store the response and answer for the service after it stops.

What is not stored

This checker runs on a server, and the server is not deployed yet, so the form above is disabled. The manual steps on the procedures below return the same answer from your own machine, and they are what the checker automates.

Limits

  • One request from one location, the server this checker runs on. A probe inside the service network, or one that sends credentials, can get a different answer.
  • The timing is one sample, not a latency figure for the service. No threshold is applied, except a warning when the answer used more than half of the 10 second budget.
  • The check cannot see behind a load balancer. Another instance can be failing while the one that answered reports healthy.
  • At most 1,048,576 bytes of the body are read. A longer body is reported as not parsed.
  • Only the top-level status is interpreted. Nested checks and components are not read one by one.

Procedures that explain the result

Put it on your own page

Link to it with the value filled in, and the checker runs as soon as the page opens.

<a href="https://h2check.org/tools/health-endpoint/">Health check endpoint test</a>