next up previous contents
Next: TUNNEL Up: TCP Previous: Using TCP and TCPPING   Contents

Using TCP and TCPGOSSIP

As mentioned before TCPGOSSIP is essentially the same as PING with properties gossip_host, gossip_port and gossip_refresh set. However, in TCPGOSSIP these properties are called differently as shown below (only the bottom two protocols are shown):

      "TCP:" +
      "TCPGOSSIP(initial_hosts=localhost[5555],localhost[5556];gossip_refresh_rate=10000;" +
                 "num_initial_members=3;up_thread=true;down_thread=true):" +

The initial_hosts properties combines both the host and port of a GossipServer, and it is possible to specify more than one GossipServer. In the example there are two GossipServers at ports 5555 and 5556 on the local host. Also, gossip_refresh_rate defines how many milliseconds to wait between refreshing the entry with the GossipServers.

The advantage of having multiple GossipServers is that, as long as at least one is running, new members will always be able to retrieve the initial membership. Note that the GossipServer should be started before any of the members.



Bela Ban 2002-11-16