-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
reporting node health #27
Comments
Hello, could you provide a bit more background on why do you need this? Is this for Kubernetes or smth similar? Also do you need this per node or per full setup (i.e. switch to another Centrifugo setup on balancer for example)? Not sure at moment which information I should provide to you as I don't understand what do you mean under |
Hey, yes of course.
Exactly, I deployed centrifugo into multiple kubernetes clusters and I'm currently using the admin
I was envisioning something more like per container (so per node I suppose?), so if a container would for example lose access to redis for any reason, the healthcheck would start failling and kubernetes (or any other similar tool) could find this out via healthcheck then re-kick the problematic container. Hope this is more clear now, thanks for the quick answer. |
First idea is adding health status change here - this is a place where node tries to send information about itself to other nodes. This is done periodically and if this operation fails - engine is not working. But this won't properly work in case when Redis sharding used at moment as we try to deliver Control message using each Redis shard in order, so actually some of them can return error. Looks like if we want to check all shards this feature requires new |
Is this really something this healthcheck should be concerned about thought? On a cluster installation (a redis cluster in this case), node failures are acceptable as long as the whole cluster is still operational.
Checking the health of each and every shard sounds like something redis should be doing, not centrifuge. There's even a command for that on Thoughts? |
Centrifuge uses application-level sharding (not Redis cluster). Because PUB/SUB does not scale well in Redis cluster - redis/redis#2672 and Redis mailing list. So we have to manually check each shard. Does it make sense? Yep, the |
Oh that explains it, it does make sense, thank you.
Great news! I see the PR is merged now, do you have any kind of time line for when this should be generally available? Thanks for making it happen btw 🎉 |
It's already available in Centrifugo v2.1.0 - but it just provides health endpoint without doing extra checks inside engine - i.e. here is a healthcheck handler. If you need more than that we still have to do this inside this lib first. |
This satisfies my current needs, thank you! |
OK, great! Will close this issue then because my current needs also satisfied with that simple health checker, if you will need more from it feel free to reopen! |
How is node health reported? Looked around in the code and couldn't see anything obvious.
centrifugo's api has no healthcheck endpoint, while investigating how to create one I noticed that health would need to be reported by each node. Is that correct?
To start simple we could just ping the configured engine, then report "ok" or "not ok".
I'm willing to send a PR, but would probably need a little guidance to get me started.
Great project btw.
Thanks!
The text was updated successfully, but these errors were encountered: