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

memberlist.Join is slow if many hosts cannot be reached - running in serial? #105

Open
inversion opened this issue Jan 25, 2017 · 2 comments

Comments

@inversion
Copy link

inversion commented Jan 25, 2017

I'm trying to use the start_join configuration on my Consul clients with a list of all the potential LAN server IPs (of which there are 33) as they are assigned via DHCP. I am running 3 Consul servers in that range.

I've noticed that the initial join is very slow with this many IPs, as if it is trying to join them in serial. It takes about a minute for it to check through 10 IP addresses and get to one which is actually hosting a server. I couldn't find any configuration in Consul which seemed relevant for reducing what I presume is a long connection timeout, or to try and join the start_join addresses in parallel

I think this is the relevant source code, though I am not very familiar with golang:

for _, exist := range existing {

It appears that this attempts to join the existing array in serial. Is that correct? If so would it be reasonable to attempt to join these members in parallel?

@slackpad
Copy link
Contributor

slackpad commented Feb 8, 2017

Hi @inversion we'd have to look at bit to make sure there are no lock assumptions, but it seems like it should be possible. I'd probably limit the parallelism to something on the order of 10 at once.

@vtolstov
Copy link

gentle ping...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants