Search code examples
javaload-balancingdistributed-computinghazelcast

Multicast discovery Of Hazelcast


Can someone tell how Multicast Discovery of HazelCast actually works. I want details on each member discovers its peers. I have been trying to find some good resource but haven't found any detailed explanation for it.


Solution

  • From the Mastering Hazelcast online book (https://hazelcast.org/mastering-hazelcast/#join-mechanism):

    With multicast discovery, a member will send a message to all members that listen to a specific multicast group.

    (i.e. when trying to join). This boils down to binding to a multicast group address and port and listening for incoming connections. The address+port pair must be known to all nodes. So instead of each node knowing in advance the actual address of all other nodes, they all need to know the multicast group address and port.

    Also described here: http://docs.hazelcast.org/docs/3.10.4/manual/html-single/index.html#discovering-members-by-multicast

    While a node is connected, it will periodically send heartbeats to other nodes. If heartbeats are missed for a certain period of time, then the node is assumed disconnected (http://docs.hazelcast.org/docs/3.10.4/manual/html-single/index.html#failure-detector-configuration)