My question is: Do you implement these? What are the gotchas / benefits? And, what kind of data do you serve from them? Is it just basic service uptime, or a load of other stats about the "health" of your service? (If so, what)?
And further, if you have a `/health` what do you consume that endpoint with?
Thank you for your thoughts.
There are two variations of a health endpoint, you should consider adding them both:
A "readiness" endpoint is dead simple - is the application alive? If not, the orchestrator will shut down the application and try to restart it.
A "liveness" endpoint does more work to ensure that, e.g. you have a valid database connection and your app can actually serve real traffic. I usually connect to the db and run a simple "select 1;". If that fails, the orchestrator will reroute traffic away from this instance - but not restart it.
For a current project it's literally just a HTTP 200 served by the application server.