Skip to content
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

Merged
merged 5 commits into from
Jul 30, 2019

Conversation

betatim
Copy link
Member

@betatim betatim commented Jul 26, 2019

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"?)

@betatim
Copy link
Member Author

betatim commented Jul 26, 2019

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.

@betatim betatim changed the title [WIP] Add a /health endpoint to BinderHub [MRG] Add a /health endpoint to BinderHub Jul 29, 2019
@betatim
Copy link
Member Author

betatim commented Jul 29, 2019

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.

Copy link
Collaborator

@willingc willingc left a 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.

@betatim
Copy link
Member Author

betatim commented Jul 30, 2019

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.

@betatim betatim merged commit 822f7c9 into jupyterhub:master Jul 30, 2019
@betatim betatim deleted the health-handler branch July 30, 2019 16:12
yuvipanda pushed a commit to jupyterhub/helm-chart that referenced this pull request Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants