Comments (9)
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 node health
in this moment.
from centrifuge.
Hey, yes of course.
Is this for Kubernetes or smth similar?
Exactly, I deployed centrifugo into multiple kubernetes clusters and I'm currently using the admin /
endpoint as healthcheck, but it's not suitable for all my envs and it isn't a very trust worthy one either.
Also do you need this per node or per full setup (i.e. switch to another Centrifugo setup on balancer for example)?
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.
from centrifuge.
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 Health
method in engine which will return health status taking into account all shards and any engine specific things.
from centrifuge.
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.
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.
Looks like if we want to check all shards this feature requires new Health method in engine which will return health status taking into account all shards and any engine specific things.
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 redis-cli
: redis-cli --cluster check 127.0.0.1:7000
. I think an exposed ping (or health) method in the engine should be enough. Then the Node
would expose a status check method.
Thoughts?
from centrifuge.
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.
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 Node
must have Health
method too of course. Btw - look at related pr I opened recently - it waits for this method to be implemented in this lib.
from centrifuge.
Centrifuge uses application-level sharding (not Redis cluster). Because PUB/SUB does not scale well in Redis cluster - antirez/redis#2672 and Redis mailing list. So we have to manually check each shard. Does it make sense?
Oh that explains it, it does make sense, thank you.
Yep, the
Node
must haveHealth
method too of course. Btw - look at related pr I opened recently - it waits for this method to be implemented in this lib.
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 🎉
from centrifuge.
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.
from centrifuge.
This satisfies my current needs, thank you!
from centrifuge.
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!
from centrifuge.
Related Issues (20)
- ServerJoin event not sent HOT 4
- client.send(data) disconnects clients on empty data HOT 2
- Occasional data race in `initMetricsRegistry` HOT 1
- Clients being disconnected due to "Slow" reason - throttling options HOT 14
- Redis broker pool size HOT 4
- KeyDB connect HOT 3
- private channel HOT 2
- Deprecated ProtocolVersion1 will be removed soon HOT 1
- Client level heartbeat config HOT 7
- Custom recover at connection level HOT 4
- High memory consumption HOT 7
- Apply suggestions from fieldalignment for frequently used objects HOT 1
- Making send call to return a reply HOT 1
- Publish() causes a runtime error when no client subscribed to then channel. HOT 2
- [feature] presence with massive amount of active users HOT 6
- Remove SockJS transport HOT 1
- Embed Gorilla WebSocket HOT 1
- How Many Concurrent RPC Requests can server handle? HOT 2
- [feature] Return error when publishing with incorrect history TTL + history meta TTL configuration
- [bug] Investigate occasional panic in tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from centrifuge.