315

In the Kubernetes/Docker ecosystem there is a convention of using /healthz as a health-check endpoint for applications.

Where does the name 'healthz' come from, and are there any particular semantics associated with that name?

0

1 Answer 1

401

It historically comes from Google’s internal practices. They're called "z-pages".

The reason it ends with z is to reduce collisions with actual application endpoints with the same name (like /status). See this talk for more: https://vimeo.com/173610242

Similar endpoints (at least inside Google) are /varz, /statusz, /rpcz. Services developed at Google automatically get these endpoints to export their health and metrics and there are tools that collect the exposed metrics/statuses from all the deployed services.

Open source tools like Prometheus implement this pattern (since original authors of Prometheus are also ex-Googlers) by coming to a well-known endpoint to collect metrics from your application. Similarly OpenCensus allows you to expose z-pages from your app (ideally on a different port) to diagnose problems.

4
  • 2
    Go expvar golang.org/pkg/expvar is quite close to /varz
    – ptman
    May 22, 2020 at 12:08
  • 1
    @AhmeB: Thank you for the video link. it help me understand little more about healthz
    – Gatsby Lee
    Jun 29, 2020 at 23:04
  • 7
    Question is answered at 26:55 in the talk (but this answer already contains pretty much the entire answer given by Kelsey).
    – tjanson
    Sep 11, 2020 at 19:06
  • Ask about the employee who used the handle @statusz
    – Erich
    Sep 11 at 21:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.