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

Add health check endpoint #145

Closed
dlackty opened this issue Apr 24, 2017 · 7 comments · Fixed by #146
Closed

Add health check endpoint #145

dlackty opened this issue Apr 24, 2017 · 7 comments · Fixed by #146

Comments

@dlackty
Copy link

dlackty commented Apr 24, 2017

When our team trying to deploy gemstash to our servers, we immediately found that there's no health check endpoint for load balancer to check.

Is there any existing endpoint for that purpose? Otherwise, is there any way to manually insert rack middleware?

I would like to help but I need your inputs. Thanks!

@olleolleolle
Copy link
Member

@dlackty https://github.com/imajes/rack-heartbeat is an OK GET /heartbeat Rack middleware.

But, it seems you won't be able to inject more middleware on a stock Gemstash

https://github.com/bundler/gemstash/blob/af0fd04a0437e9fec9cc07f6d41333716046ed98/man/gemstash-customize.7.md#server

@dlackty
Copy link
Author

dlackty commented Apr 26, 2017

I see. However, I would prefer https://github.com/mirakui/rack-health because its simplicity.
I would try to integrate and send out a PR soon.

@olleolleolle
Copy link
Member

@smellsblue Has there been discussion on "how do I extend my Gemstash server with extra middleware"?

@smellsblue
Copy link
Contributor

I've been a bit out of the loop lately due to work, vacation and now railsconf, but I'm definitely interested in both a health check and middleware (which I've played with a bit but don't have anything complete yet).

I think health check is important enough to be part of Gemstash directly. I'd be happy to help with a change or help get a PR merged!

@smellsblue
Copy link
Contributor

By the way, my colleagues and I have made a health check set of gems that works with just rack (or rails for a separate gem).

Maybe we can utilize it here?

https://github.com/on-site/server_health_check-rack

@sandstrom
Copy link

Although opinionated, I think /health would be a good endpoint since it's quite common. But I'm happy with any endpoint name 😄

@smellsblue smellsblue mentioned this issue May 2, 2017
4 tasks
@smellsblue
Copy link
Contributor

I still need to add documentation, but would #146 work? It checks that read and write works, but also has a heartbeat endpoint if you just want to ping the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants