Administer > Configuring installation and setup options > Server implementation options > Configure Service Manager Jgroups to use TCP instead of UDP

Configure Service Manager Jgroups to use TCP instead of UDP

UDP and TCP

Service Manager JGroups can be configured to use either User Datagram Protocol (UDP) or Transmission Control Protocol (TCP). By default, Service manager uses UDP.

However, UDP has some limitations. First, it does not ensure that communications have reached the receiver, as the protocol does not incorporate the concepts of acknowledgment, time out, and retransmission. More importantly, UDP uses IP multicasting to send messages to entire clusters. Cloud service providers usually do not allow the configuration of IP multicasting, and therefore JGroups on UDP cannot be run in a cloud environment.

TCP is designed to address these limitations. TCP is more reliable because it manages message acknowledgment and retransmissions in the event of lost parts. Instead of using IP multicasting, TCP sends multiple unicast messages to cluster members, so that JGroups on TCP can be run in environments that do not support IP multicasting.

Note The Service Manager startup process and the sm -reportlbstatus report generation process are slower when you run Jgroups on TCP. This occurs because a new cluster member registers itself to the GossipRouter and queries the GossipRouter for initial cluster membership information when is starts up. Additionally, the new cluster node needs to establish TCP connections with existing members.

Configuring Service Manager Jgroups to use TCP

When you configure JGroups to use TCP, each message to all cluster members is sent as multiple unicast messages (one message to each member). Because IP multicasting cannot be used to discover the initial members, this process requires a GossipRouter. Existing cluster members register by using their cluster name, and new members query the GossipRouter for initial cluster membership information.

 

Service Manager nodes register themselves to the GossipRouter(s) and query the GossipRouter(s) for initial cluster membership information when they start. This process may slow down the speed of the Service Manager startup process. Therefore, although using multiple GossipRouters is supported, we recommend that you use only one GossipRouter. The advantage of using multiple GossipRouters is that new members will always be able to retrieve initial membership, even if some of the GossipRouters do not work (as long as one is still running). To start multiple GossipRouters, you can add multiple commands to one sm.cfg file, or you can add one command to the sm.cfg file on multiple Service Manager hosts.

Note For more information about how to start one or more GossipRouter processes to support the use of TCP, see Configure Jgroups to use TCP in a horizontally-scaled environment and Configure Jgroups to use TCP in a vertically-scaled environment.