Comments (12)
We talked about this in IRC today. We came up with a few points:
- You probably never want to replay events (even unique ones) on a manual
serf join
. It may be useful to add a flag to Serf.Join to ignore events from the push/pull sync. - Coalesce, like you said here, by default. Add a flag if you don't want it to coalesce.
serf event -repeatable foo
from serf.
After our conversation last night since it's likely in the vast majority of use-cases you do not want the replay events, do you think it'd make more sense to make serf join
ignore these events by default and the flag would instead accept them?
from serf.
@jpfuentes2 Yeah, we plan on implementing this very soon. The coalescing itself is a harder problem. Armon described it to me last night:
- You have nodes A+B in one Serf cluster.
- You have nodes C+D in another Serf cluster.
- Both clusters live on their own for some period of time, using events and what-not.
- You join B to C. Now the cluster becomes A+B+C+D.
- It is easy to coalesce the events on C, but then they all still get broadcast out to D (by A or B), which is much harder.
from serf.
looking forward to serf join --ignore-history or something similar
+1
from serf.
Just out of curiosity, how many events are backlogged? For sure it can't be infinite, right? Couldn't find any hint in the docs about that
from serf.
@vmalloc I believe 512, currently. This is hardcoded and non-configurable.
from serf.
@vmalloc Actually that might be 1024, its either 512 or 1024.
from serf.
@vmalloc I guess it depends on what you mean by backlogged. If you sit in a tight loop firing serf events
, then the transmit queues will basically become infinitely backed up. They start to generate warnings about queue depth, but will otherwise not stop you. In terms of anti-entropy and ensuring message delivery, we have a config called EventBuffer
(https://github.com/hashicorp/serf/blob/master/serf/config.go) which defaults to 512. EventBuffer controls how many events which we have received we keep around to perform anti-entropy. This is the buffer that gets 'replayed' when a partition heals or node joins, etc. Hope that makes sense!
from serf.
As of 331142d the ground work for this is in. When Join
is called, ignoreOld can be used to avoid processing older messages. Events can be coalesced using configuration setting when starting serf, and it can be enabled/disabled on a per-message basis when an event is fired.
What is left now is to integrate this up into the agent and CLI. For now, the behavior of the agent/CLI is the same for compatibility. @mitchellh do you want to take this?
from serf.
Assigned to myself, I should have a PR for this very shortly.
from serf.
@armon Question: do you think user events should be coalescable by default? i.e. serf event foo
== foo is coalesced? I think in the common case, coalescing is okay and may be expected behavior. But wanted to check.
from serf.
@mitchellh I think we coalesce by default yes, it seems like the expected case
from serf.
Related Issues (20)
- CVE-2019-19794 on last release by repos hashicorp/mdns
- Website Simulator Alert for Number of Nodes Check is Off-by-One
- When a serf member is leaving the pool using `Leave` if `messageLeaveType` broadcast fail, the leave is not completed
- maybe mark `v0.9.6` as the latest release?
- Release latest binaries HOT 2
- response size check on keyListResponseWithCorrectSize breaks with 32bit keys and keyring size >20
- Data race related to query Ack channel
- Is Serf suitable for integration into the kubernetes app as a library?
- When the nodes leave and start at the same time in a large-capacity consul cluster, some member states will continue to keep leaving, not alive.
- Upgrade kramdown package used in Website Gemfile.lock to version 2.3.0+ to fix Remote Code Execution CVE-2020-14001
- Can't bind Serf agent to IPv6 address
- serf panics on MacOS when waking up from sleep during a network switch
- serf agent panic when -iface and -discover is given HOT 2
- serf: protect field access with lock to avoid potential data race
- [Question] User events to a node rejoining the cluster
- Is this a small typo? Should read start and stop?
- Please, Upgrade armon/go-metrics to hashicorp/go-metrics
- Question regarding the estimation of the latency between two kubernetes clusters using serf
- Unix Domain Sockets for the RPC address.
- Using as a library of managing membership, Is serf just provides a different/better implementation of memberlist? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serf.