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

Update Serf and memberlist #4511

Merged
merged 1 commit into from
Aug 9, 2018
Merged

Update Serf and memberlist #4511

merged 1 commit into from
Aug 9, 2018

Conversation

banks
Copy link
Member

@banks banks commented Aug 9, 2018

This includes fixes that improve gossip scalability on very large (> 10k node) clusters.

The Serf changes:

Memberlist changes:

  • prioritize handling alive messages over suspect/dead to improve stability, and handle queue in LIFO order to avoid acting on info that 's already stale in the queue by the time we handle it. Prioritize alive message over other messages memberlist#159
  • limit the number of concurrent pushPull requests being handled at once to 128. In one test scenario with 10s of thousands of servers we saw channel and lock blocking cause over 3000 pushPulls at once which ballooned the memory of the server because each push pull contained a de-serialised list of all known 10k+ nodes and their tags for a total of about 60 million objects and 7GB of memory stuck. While the rest of the fixes here should prevent the same root cause from blocking in the same way, this prevents any other bug or source of contention from allowing pushPull messages to stack up and eat resources. Limit concurrent push/pull connections memberlist#158

Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mkeeler mkeeler merged commit 9ce1076 into master Aug 9, 2018
@mitchellh mitchellh deleted the update-serf branch August 22, 2018 00:59
@bcmills
Copy link

bcmills commented Sep 11, 2018

In the course of investigating golang/go#27457, I noticed that the latest tagged version of consul requires a version of serf from after its latest release tag, and I suspect it's due to this change.

Was that property intentional? (If not, you might want to add a step to your release-tagging checklist to make sure all dependencies are also tagged.)

@banks
Copy link
Member Author

banks commented Sep 12, 2018

@bcmills Yes sadly it is intentional. Serf as a product has not a lot of active development currently so there have been several bug fixes to it that are needed in upstreams that consume it as a library but no official release of the Serf binary yet.

We intend release Serf soon though as several worthwhile improvements and fixes have accumulated now. If it's causing any issues for you let us know.

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

Successfully merging this pull request may close these issues.

3 participants