Use consistent hash to heartbeat to a few nodes instead of all, see #2284

* Previously heartbeat messages was sent to all other members, i.e.
  each member was monitored by all other members in the cluster.
* This was the number one know scalability bottleneck, due to the
  number of interconnections.
* Limit sending of heartbeats to a few (5) members. Select and
  re-balance with consistent hashing algorithm when new members
  are added or removed.
* Send a few EndHeartbeat when ending send of Heartbeat messages.
This commit is contained in:
Patrik Nordwall 2012-10-01 14:12:20 +02:00
parent 7557433491
commit 3f73705abc
8 changed files with 172 additions and 60 deletions

View file

@ -287,8 +287,8 @@ private[cluster] final class ClusterCoreDaemon(publisher: ActorRef) extends Acto
// wipe the failure detector since we are starting fresh and shouldn't care about the past
failureDetector.reset()
heartbeatSender ! JoinInProgress(address, Deadline.now + JoinTimeout)
publish(localGossip)
heartbeatSender ! JoinInProgress(address, Deadline.now + JoinTimeout)
context.become(initialized)
if (address == selfAddress)