Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Hazelcast autodiscovery work?

I would like to know how the Hazelcast autodiscovery works. How do nodes find other nodes in the network? And how do they know when a node is dead?

like image 855
Amir Kost Avatar asked Jan 24 '14 09:01

Amir Kost


1 Answers

There are 3 different forms of discovery:

  • multicast. So we shout around on the network and try to find other members
  • tcp/ip: we need to have a few well known members. If one or more of these well known members is online, other members can form a cluster.
  • aws: we just log into aws, read out all the instances within a given region, apply some filtering, and what we remains are well known members. From that point on we rely on tcp/ip based clustering.

So this is in short how auto discovery works.

Detection node failure is done based on heart beats. So every x seconds we send a message to a all members in the clusters, the ones that can't reply, are eventually declared dead.

like image 162
pveentjer Avatar answered Sep 18 '22 10:09

pveentjer