Configure Jgroups to use TCP in a vertically-scaled environment

This section explains how to switch an existing vertically-scaled environment from UDP to TCP, and how to configure a new horizontally-scaled environment to use TCP.

How to switch an existing vertically-scaled environment from UDP to TCP

  1. Add the following command to the beginning of the sm.cfg file:

    sm -GossipRouter -Gossiprouterport:<value>

    Note Make sure that you select an unused port as the value of the Gossiprouterport parameter. Additionally, you must add this command to the beginning of the sm.cfg file so that the GossipRouter starts before any other Service Manager processes.

  2. Add the following initialization parameters to the sm.ini file:

    • jgroupstcp:<value>
    • GossipRouterhosts:<value>
  3. Optional: Add the following initialization parameters to the sm.ini file:

    • grouptcpbindport:<value>
    • asyncrefreshlbinterval:<value>
    • grouptcpjointimeout:<value>

How to configure a new vertically-scaled environment to use TCP

  1. Add the following commands to the sm.cfg file:

    • sm –GossipRouter -Gossiprouterport:<value>

      Note Make sure that you select an unused port as the value of the Gossiprouterport parameter. Additionally, you must add this command to the beginning of the sm.cfg file so that the GossipRouter starts before any other Service Manager processes.

    • sm -loadBalancer -httpPort:<value>
    • sm -httpPort:<value> -httpsPort:<value>
    • sm system.start
  2. Add the following initialization parameters to the sm.ini file:

    • jgroupstcp:<value>
    • GossipRouterhosts:<value>
  3. Optional: Add the following initialization parameters to the sm.ini file:

    • groupbindaddress:<value>
    • grouptcpbindport:<value>
    • asyncrefreshlbinterval:<value>
    • grouptcpjointimeout:<value>

Example of a vertically-scaled TCP implementation

Machine

sm.cfg (excerpt)

sm.ini (excerpt)

myserver1 

10.0.0.135

(Primary Host)

sm -GossipRouter Gossiprouterport:12001 sm -loadbalancer -httpPort:13080 sm -httpPort:13081 -httpsPort:13082 sm -httpPort:13083 -httpsPort:13084 sm system.start

jgroupstcp:1 GossipRouterhosts: myserver1[12001]