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

Question about broadcasts #92

Closed
F21 opened this issue Oct 31, 2016 · 1 comment
Closed

Question about broadcasts #92

F21 opened this issue Oct 31, 2016 · 1 comment

Comments

@F21
Copy link

F21 commented Oct 31, 2016

I have read #10 and have the following questions:

  1. If I use QueueBroadcast() on a memberlist.TransmitLimitedQueue, will it send the messages to every single node on the network? If so, why does serf's implementation rebroadcast the message after calling handleUserEvent(): https://github.com/hashicorp/serf/blob/555e0dcbb180ecbd03431adc28226bb3192558bc/serf/delegate.go#L62 ?

  2. Under what circumstances will a message be broadcast? I am trying to broadcast a protobuf message that's 18 bytes, however, a lot of times, the message does not seem to be broadcast after it is queued.

@slackpad
Copy link
Contributor

slackpad commented Feb 8, 2017

Hi @F21 for the first question, that queue still relies on gossip to broadcast the message, so a given node won't send it to every node in the cluster - it'll be broadcast via gossip to a few other nodes up to the calculated retransmitLimit (from the originating node). The call in handleUserEvent() helps keep the even propagating via gossip when it is received on another node. If the event is new to a given node, it'll broadcast it in a similar fashion. This keeps it moving through gossip as long as nodes are still hearing about it for the first time. Hope that helps answer the second question as well!

@slackpad slackpad closed this as completed Feb 8, 2017
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

2 participants