[zeromq-dev] Multicast Autodiscovery Protocol

Ian Barber ian.barber at gmail.com
Thu Jun 23 18:51:05 CEST 2011

Hi all,

ptrb on the IRC channel just asked an interesting question about automatic
node discovery for mostly local nodes. I was thinking a protocol for doing
such would be a somewhat reusable item, so perhaps worth
whitepapering/unprotocoling/etc. but I wanted to check my general thinking
as I'd imagine people on this list have actually written something like
this, while I haven't :) So, a rough sketch:

On startup of a given node A, A will connect a SUB socket on a pre-defined
multicast IP and Port and waits a brief time for a node list message.
If a message is received, the new nodes are added to A's internal node list.
If the node list does not contain A, then A will PUB a message on the same
multicast address containing the node-list plus itself.
If no message is received after the timeout A will PUB a node-list
containing only itself.
A will occasionally poll the SUB socket and process any node-list messages
as above.
If node A ever needs to communicate with another node (B) and cannot, it
will PUB it's node-list, with node B omitted.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110623/cf54e2b7/attachment.htm>

More information about the zeromq-dev mailing list