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

When multiple etcd stores are passed to the API. Which one is given preference? #198

Open
djain13 opened this issue Jan 25, 2018 · 1 comment

Comments

@djain13
Copy link

djain13 commented Jan 25, 2018

When multiple etcd stores are passed to the libkv API. Which one is given preference?

  • Round robin
  • First available one in the list
  • Or randomly one of them is picked
@djain13
Copy link
Author

djain13 commented Jan 25, 2018

After opening the issue. I dug a little deeper into etcd client code and documentation, here are my observations:
As per etcd/client documentation(caveat section, https://github.com/coreos/etcd/tree/master/client) and some code investigation(client.go, Do() function), it looks like they randomize(shuffle) the given set of endpoints, pick the first one and continues to use that until it fails to respond. Later they pick the next one from the set of endpoints and continues to use that.

If my above understanding seems correct to libkv team? Feel free to close the issue.

Cheers
Dharmesh

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

No branches or pull requests

1 participant