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

Unable to disable push/pull sync #78

Open
tonglil opened this issue Mar 30, 2016 · 2 comments
Open

Unable to disable push/pull sync #78

tonglil opened this issue Mar 30, 2016 · 2 comments

Comments

@tonglil
Copy link

tonglil commented Mar 30, 2016

Configuration:

    // Configure memberlist
    conf := memberlist.DefaultWANConfig()
    conf.AdvertisePort = port
    conf.AdvertiseAddr = ip
    conf.BindPort = port
    conf.BindAddr = ip
    conf.Name = name
    conf.Events = delegate
    conf.GossipNodes = 6
    conf.GossipInterval = conf.GossipInterval * 5 // 2.5s
    conf.PushPullInterval = 0 // this should disable PushPull based on https://github.com/hashicorp/memberlist/blob/master/config.go#L66
    conf.DisableTcpPings = true
INFO[0015] memberlist - [DEBUG] memberlist: Initiating push/pull sync with: 127.0.0.1:23333 
INFO[0015] memberlist - [DEBUG] memberlist: TCP connection from=127.0.0.1:59993 

I am trying to minimize or eliminate TCP connections between nodes.

However when I start the server, it still creates TCP connections.

Does memberlist always sync state when it is joining a cluster?

@jpfuentes2
Copy link

I've been perusing this code and working on a memberlist-compliant service in another language for kicks. The README.md and config.go seem to suggest that with the right configuration TCP will not be used at all.

Unfortunately, as @tonglil described above: TCP is used when one issues a memberlist.Join as it calls pushPullNode which in turn calls sendAndReceiveState here.

Should sendAndReceiveState support UDP at the expense of bandwidth?

@slackpad
Copy link
Contributor

Hi @tonglil and @jpfuentes2 this has been in there for quite a long time - a43fd04#diff-c5a0fd3b9b3c075b837e5f6dc71db15d. We will have to think through the implications of omitting this step - I'm not 100% sure if things would converge correctly without this on the initial join without going through the details.

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

3 participants