-
Notifications
You must be signed in to change notification settings - Fork 131
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
Cluster discovery via server info #125
Cluster discovery via server info #125
Conversation
wallyqs
commented
Aug 9, 2016
- Implements cluster auto discovery which 0.9.2 server now supports
- Bumps gem to 0.8.0 major version
9eb03d7
to
3489390
Compare
Guessing a doc update is pending but with this you only tell the gem one server in a cluster and it discovers new ones and will fall over to them? On fall over will it again discover a new set and expel ones not valid anymore? I have very long running clients - months - so for this kind of thing to make sense there must be some runtime refreshing. |
Yes doc updates are pending, but it basically works as you mention. As new nodes attach to the cluster the clients puts them on the list of nodes to which it can connect as server announces them. During fail over, it will back off in case any of those servers failed previously when attempting to reconnect. |
Oh so even during the normal connection as servers come and go they will be announced and the client will update its state - without having to reconnect to get a new list? That is amazing if that's how it works. Really good thanks |
Yes that is how it works, not needed to reconnect to get new list of servers as long as nodes attach to the same cluster /cc @kozlovic |
Brilliant thank you. That'lol hugely simplify life |
When the client library connects to a server that is already part of a cluster, it will get the list of connect URLs of all servers, and add it to its list of servers. These will be used during a reconnect. |
When I wrote "come and go", I am talking about a server that is stopped/restarted, not new server added to the cluster. Say that you have a cluster of servers A, B and C (full mesh). If a client connects to A, it will be sent the list of B and C. Now say C is stopped, there is no update to clients. C is brought back up, there is still no update to clients. D joins the mesh, clients will be notified of this addition. |
I see thanks. Live topology updates would be super handy for people who elasticly build their cluster but as is its already a good advantage - cluster members come and go on different IPs. For now I use SRV in my client code and update the record dynamically. I realise achieving live updates is a MATS protocol change and so probably quite unlikely |