Use status codes in health checks
lann opened this issue · comments
It is conventional for an HTTP health check endpoint to reflect its status in both text (e.g. "healthy"/"unhealthy") and status code (200 / 503 is common). Some tools like Nomad's HTTP health checks expect status codes to reflect service health.
If anyone wants to take a crack at this...
Here's where we register health checks:
Lines 30 to 33 in 8fee82b
Here's where we map those health checks to /healthz
:
Line 119 in 8fee82b
Here's the code for said health checks: https://github.com/deislabs/hippo/tree/8fee82bfb819534a21546b79aa934deeb9eed3bd/src/Infrastructure/HealthChecks
The best place to start may be to read through Health checks in ASP.NET Core. I skimmed the document when spiking it out - it's possible we can accomplish smarter health checks using the existing system. If not, I'm not opposed to replacing it with a custom health check controller.