-
Notifications
You must be signed in to change notification settings - Fork 38
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
Handle INFO messages received from the cluster #54
Comments
@quixoten do you know if the username/password/tls etc settings are always required to be the same across a cluster? Seems like that's what most people will do, but just wondering if it is required |
It is not required. I was able to cluster two gnatsd servers with different TLS settings. One enabled and one disabled. I think the same is likely true of the auth settings because the cluster config has separate auth settings, which could be an interesting way of bridging clients in different security zones. Not sure what this looks like to implement. Maybe some layer that will toss out invalid server uris and than crash altogether when it runs out? Could a layer above that then collect a fresh list of server uris, e.g., from etcd, and then restart the next layer down? |
Hmmmm, I wonder if we should make the client code handle this problem? Maybe we let the client pass in a function that is used to select a host each time we try to establish a connection? For a basic fixed-set of nodes that function could just sample from the list each time, but for someone using Do we get notifications from the brokers when a node leaves the cluster? |
I tried to find some more details about this and from what I can see the
|
I agree it's not documented very well, maybe because it's a newer feature, but it is part of the client protocol; however, the client must declare support for it in its CONNECT message. See the documentation for |
Here's where some other clients handle this: pure-ruby-nats Here is the server side implementation: |
@quixoten pointed out in a previous PR that when the cluster topology changes (nodes enter or leave?) nats sends
INFO
messages with additional information about where each node lives. This way you could do a rolling set of restarts and give the new nodes totally different addresses while keeping all clients online.We should add support for these messages and somehow update our list of available nodes.
The text was updated successfully, but these errors were encountered: