Comments (6)
@seletskiy Take a look at the Serf delegate implementation. https://github.com/hashicorp/serf/blob/master/serf/delegate.go#L101
Specifically, you generally want to pair GetBroadcasts with a TransmitLimitedQueue:
https://github.com/hashicorp/memberlist/blob/master/queue.go#L12
That queue is responsible for managing the number of re-transmissions per message. The reason this is decoupled is because the TransmitLimitedQueue allows for custom invalidation behavior. (For example, if I'm broadcasting "A is dead", and A comes back alive, I want to invalidate the previous message, and start broadcasting "A is alive" instead).
Hope that helps!
from memberlist.
@armon: Hmm, thanks for the answer! It is I'm looking for.
And another question: why library does not contain automatic network discovery (for example, via sending on UDP broadcast address)? I think it'l made network much more robust, because of there will be at least to mechanisms of registering nodes: registering on well-known nodes and via nodes in the same subnet.
from memberlist.
@seletskiy If you use the higher-level Serf library, it has the ability to use mDNS (basically multicast) to do that. This is the library if you want to use it yourself: https://github.com/armon/mdns. Look at the "-discover" flag of serf.
The basic reason it is not done in memberlist is that broadcast and multicast are both very unreliable. Most network deployments do not even support it (EC2, Azure, DigitalOcean, Rackspace, etc). Since Serf is largely designed for those environments, it adds complexity without any real use.
from memberlist.
Thank you very much for the answers. Because of I'm working with my own
bare-metal environment, broadcasting will work very well.
On 6 Mar 2014 01:26, "Armon Dadgar" [email protected] wrote:
@seletskiy https://github.com/seletskiy If you use the higher-level
Serf library, it has the ability to use mDNS (basically multicast) to do
that. This is the library if you want to use it yourself:
https://github.com/armon/mdns. Look at the "-discover" flag of serf.The basic reason it is not done in memberlist is that broadcast and
multicast are both very unreliable. Most network deployments do not even
support it (EC2, Azure, DigitalOcean, Rackspace, etc). Since Serf is
largely designed for those environments, it adds complexity without any
real use.Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-36775616
.
from memberlist.
@seletskiy My pleasure. Is there any reason you are using this library instead of the higher-level Serf library? It provides a lot of niceties that this library lacks.
from memberlist.
@armon: I'l take a closer look on the serf library. Basically, I've found memberlist
library in a second of googling and it fits good to my purposes, so it's a reason I'm using it for now 😃.
Thanks!
from memberlist.
Related Issues (20)
- Node pointer passed to NodeJoin channel event delegate has no meta HOT 1
- Failed ping error running inside container
- Too many pending push/pull requests
- DATA RACE in invokeAckHandler
- How to detect and react to TCP only failures
- release new version HOT 2
- Feature request: Update state of node in memberlist
- MacOS arm64 support
- Data race in memberlist.go
- Is there a way to retrieve the member list without joining?
- "No private IP address found" error throwed on MacOS
- Is there any interface can I know when the cluster states got converged. HOT 1
- Question/Help: Anything need to be taken into consideration when implement a customize Transport with grpc
- Is it feasible to reuse the gassip port for grpc service? HOT 1
- `Join` with context cancelation
- Checking the state of the Node in NotifyLeave
- Can nodes be identify each MEMBERLIST without using UDP connections?
- memberlist fails in large-scale clusters HOT 1
- suggestion for supporting docker udp
- Data race in state.go:1135 HOT 1
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 memberlist.