-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRG] Add a /health endpoint to BinderHub #904
Conversation
Another question: what status code should this return when something is not working but we still want to send the JSON body (so that the requester can see what is broken)? I'd suggest 503 but that is nothing more than a hunch. |
Ready for some review. I don't know a good way to test the docker registry part :-/ Planning on testing that once it is deployed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM. I have not tested it though.
I'll merge it now. I think there are bound to be a few snags but I can't find any more right now -> needs some real world traffic/usage. |
This reports the health of BinderHub and the services it needs to run.
It is quite primitive but maybe good enough to get going? In particular the request to
/health
will take a long time if we have to retry connections to the hub or the registry. A smarter way would be to monitor those independently of someone calling the end point and having the most recent results available. Not quite sure what the best way to do that would be (where would the results be stored so they are "globally available"?)