3 Replies Latest reply on Jun 15, 2009 4:50 PM by Brian Stansberry

    Jboss Clustering over TCP

    Antonio Xavier Annasamy Newbie


      I am trying to create a jboss cluster of 2 nodes. Here is the setup required.

      1. NodeA is on server1 on VLAN1
      2. NodeB is on server2 on VLAN2.
      3. No UDP Multicast traffic allowed.

      What I have tried so far is ... in cluster-service.xml on both the servers

      in server1

      <TCP bind_addr="server1" start_port="7800" loopback="true"
      down_thread="false" up_thread="false"
      <TCPPING initial_hosts="server2[7800]" port_range="3"
      down_thread="false" up_thread="false"
      <MERGE2 max_interval="100000"
      down_thread="false" up_thread="false" min_interval="20000"/>
      <FD_SOCK down_thread="false" up_thread="false"/>
      <FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
      <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
      <pbcast.NAKACK max_xmit_size="60000"
      use_mcast_xmit="false" gc_lag="0"
      down_thread="false" up_thread="false"
      <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
      down_thread="false" up_thread="false"
      <pbcast.GMS print_local_addr="true" join_timeout="3000"
      down_thread="false" up_thread="false"
      join_retry_timeout="2000" shun="true"
      <pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>

      and in server2, the bind_addr="server2" and TCPPING initial_hosts="server1[7800]" port_range="3".... everything else is same.

      This didnt work... they didn't see each other. is there any other file which needs to be modified apart from cluster-service.xml???

      More info on the servers.... I can ping server1 from server2 and vice versa
      I am connecting to server2 from server1 via ssh and vice versa is also possible.

      I tied the following config as well...instead of using the multicast over UDP, I tried multicast over TCP

      <MPING timeout="2000"
      down_thread="false" up_thread="false"/>

      The same config on both the servers. But this config gives me errors while starting.

      More info.... is the only multicast IP working in our environment. i can ping this IP from both server1 & server2. I dont know if I am missing something or doing something wrong.
      Are there any other files which needs to be changed? is it possible to cluster 2 nodes across different VLAN's??

      I would greatly appreciate any help.



        • 1. Re: Jboss Clustering over TCP
          Brian Stansberry Master

          What AS release?

          The cluster-service.xml isn't the only relevant config file. There are also JGroups channels opened for HttpSession replication, EJB3 SFSB replication and EJB3 entity caching (if your AS version supports EJB3). Where in deploy the configs for those are depends on what AS release.

          See http://www.jboss.org/community/wiki/TestingJBoss for a procedure for trying to debug problems with nodes communicating with each other over JGroups.

          • 2. Re: Jboss Clustering over TCP
            Antonio Xavier Annasamy Newbie

            The Jboss release is 4.2.1 GA.

            I have managed to get the cluster working between the 2 servers, by using their IP's instead of their hostnames.

            I will make the necessary changes in the other files which you have mentioned to see how it goes.

            But i have heared that JBOSS clustering over TCP increases n/w traffic and cannot be scaled beyond 6 servers or so...

            Is there a way to over come this issue? like reducing the bandwidth traffic used b/w the clusters or any other other ideas?



            • 3. Re: Jboss Clustering over TCP
              Brian Stansberry Master

              TCP definitely doesn't scale as well as UDP multicast. But whether that is a real issue depends on what kind of traffic you have between the nodes. The services that generate a lot of traffic over the JGroups channels are

              1) HttpSession replication
              2) EJB StatefulSessionBean replication
              3) Hibernate/JPA entity caching.

              1) and 2) can be made highly scalable by using buddy replication. 3) is more complex, but there are things you can do as well (use INVALIDATION_SYNC, don't cache query result sets, don't cache entities that are frequently updated.)