When a new instance is started (node n), it will broadcast its information, and decide its hash key based on the following message sequence:
 

Node

Message

Queue

Description

n

send InitNode

Global

Broadcasts node id to the global queue. At this point, global queue processor is not started yet, so we can be sure that a different node will process the message.

If nobody processes it for 1 second, we can be sure that we’re the first node

<n

receive InitNode

Global

A node has submitted its id to the global queue (it just started up). Broadcast the message to all known nodes (including self)

0..n

receive InitNode

Local

Add sender to known nodes

Reply with list of known nodes (including self)

0..n

send KnownNodes

Local

 

n

receive KnownNodes

Local

For the initial InitNode message we will get one KnownNodes message from each working node.

Known node table is populated from this information.ú

If no KnownNodes message is returned for a given time (10 seconds), node assumes that it is the only living node.

Hash key is calculated based on known node table at this point.

n post Ping* Local Posts Ping message to each known node’s input queue, containing hash key.

At this point, node is set up (other nodes in the cluster are known, so it is ready to process entities). All worker and listener processes are started.

Last edited Jun 19, 2013 at 1:54 PM by delzubu, version 4

Comments

No comments yet.