learninglocker
learninglocker copied to clipboard
Add health checks end points for servers
Version
v2.6.4
Steps to reproduce the bug
This is more a feature request but... OK then:
- Visit the
/healthcheck
end point, nothing happens :stuck_out_tongue:
Expected behavior
Visiting such endpoint should respond with a 200 HTTP status and a JSON payload describing backing services status (databases, etc.) if the application is healthy and a 5xx HTTP status on error.
Detailed context
We are running Learning Locker in a Kubernetes environment (see Arnold), and we need to implement both readiness and liveness probes so that our containers can accept connections when ready and are restarted when required.
Actual behavior
Nothing happens as it has not been implemented yet.
Ready to contribute?
Sure, I can work on a PR to implement such endpoint if you agree with this :wink:
Last remark: we are following Mozilla's Dockerflow specification on our projects to implement such feature.
Hey @jmaupetit, apologies for delayed responses. Where is the /healthcheck
defined in the Mozilla Dockerflow Specification?
:wave: They call this endpoint /__heartbeat__
(see point 5).
So the endpoint should be /__heartbeat__
instead of /healthcheck
?
Yes, but in fact It's up to you: you are free to stick to Mozilla's convention literally or not.
Probably best to stick to it literally since it says "The specification has requirements that a container must comply with" and "When the application is ran in the container it must ... Respond to /__heartbeat__
with a HTTP 200 or 5xx on error"
If we're not going to stick to this literally you can just use the /data/xAPI/about
endpoint as a health check for the xAPI.