next up previous contents
Next: Using TCP and TCPPING Up: Transport protocols Previous: Using UDP without IP   Contents

TCP

TCP is a replacement of UDP as bottom layer in cases where IP Multicast based on UDP is not desired. This may be the case when operating over a WAN, where routers will discard IP MCAST. As a rule of thumb UDP is used as transport for LANs, whereas TCP is used for WANs.

The properties for a typical stack based on TCP might look like this:

    "TCP(start_port=7800):" +
    "TCPPING(initial_hosts=localhost[7800];port_range=5;timeout=3000;" +
            "num_initial_members=3;up_thread=true;down_thread=true):" +
    "VERIFY_SUSPECT(timeout=1500;down_thread=false;up_thread=false):" +
    "pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):" +
    "pbcast.NAKACK(down_thread=true;up_thread=true;gc_lag=100;retransmit_timeout=3000):" +
    "pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;" +
               "print_local_addr=false;down_thread=true;up_thread=true)";

TCP
The transport protocol, uses TCP (from TCP/IP) to send unicast and multicast messages. In the latter case, it sends multiple unicast messages.
TCPPING
Discovers the initial membership to determine coordinator. Join request will then be sent to coordinator.
VERIFY_SUSPECT
Double checks that a suspected member is really dead
pbcast.STABLE
Distributed garbage collection of messages seen by all members
pbcast.NAKACK
Reliable and FIFO message delivery
pbcast.GMS
Membership services. Takes care of joining and removing new/old members, emits view changes

Since TCP already offers some of the reliability guarantees that UDP doesn't, some protocols (e.g. FRAG and UNICAST) are not needed on top of TCP.

When using TCP, each message to the group is sent as multiple unicast messages (one to each member). Due to the fact that IP multicasting cannot be used to discover the initial members, another mechanism has to be used to find the initial membership. There are a number of alternatives:

  1. PING with GossipServer: same solution as described in 5.3.1. The ip_mcast property has to be set to false. GossipServer has to be started before the first member is started.
  2. TCPPING: uses a list of well-known group members that it solicits for initial membership
  3. TCPGOSSIP: essentially the same as the above PING5.6. The only difference is that TCPGOSSIP allows for multiple GossipServers instead of only one.

The next two section illustrate the use of TCP with both TCPPING and TCPGOSSIP.



Subsections
next up previous contents
Next: Using TCP and TCPPING Up: Transport protocols Previous: Using UDP without IP   Contents
Bela Ban 2002-11-16