Giter VIP home page Giter VIP logo

Comments (6)

armon avatar armon commented on August 19, 2024

@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.

seletskiy avatar seletskiy commented on August 19, 2024

@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.

armon avatar armon commented on August 19, 2024

@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.

seletskiy avatar seletskiy commented on August 19, 2024

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.

armon avatar armon commented on August 19, 2024

@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.

seletskiy avatar seletskiy commented on August 19, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.