1 Reply Latest reply on Feb 4, 2004 7:29 PM by Geoff Weatherall

    Setting up a simple load balancer without Session Replicatio

    Brad Balmer Newbie

      Looking at the JBoss documentation and searching online this looks to be a fairly simple setup but I cannot get this to work.

      We are running:
      apache_1.3.29
      jakarta-tomcat-connectors-jk-1.2.5
      two instances of jboss-3.2.3 on the same machine using a master port-bindins.xml file specified for the ServiceBindingManager mbean.

      Here is my full workers.properties file:
      worker.list=LM,JBoss1,JBoss2

      worker.JBoss1.port=10109
      worker.JBoss1.host=dserver
      worker.JBoss1.type=ajp13
      worker.JBoss1.lbfactor=50
      worker.JBoss1.local_worker=1
      worker.JBoss1.cachesize=10

      worker.JBoss2.port=10209
      worker.JBoss2.host=dserver
      worker.JBoss2.type=ajp13
      worker.JBoss2.lbfactor=50
      worker.JBoss2.local_worker=1
      worker.JBoss2.cachesize=10

      worker.LM.type=lb
      worker.LM.balanced_workers=JBoss1,JBoss2
      worker.LM.sticky_session=1


      In my individual jboss-service.xml files under tomcat I have:

      and

      respectivly

      With BOTH JBoss instances up at the same time JBoss1 receives ALL of the connections, ALWAYS. If I kill JBoss1, JBoss2 receives the requests correctly.

      We do not need any session replication, but we do want loadbalancing.

      Please, any idea as to what I may be missing? Any help would be greatly appreciated.

        • 1. Re: Setting up a simple load balancer without Session Replic
          Geoff Weatherall Newbie

          Yes, that is the behaviour you get "out of the box". We fixed this by naming the tomcat instances (tomcat and apache ends):

          1) On distributor in workersX.properties under each worker

          [channel.socket:nodeX.xxxxx.co.nz:8009]
          port=8009
          host=nodeX.xxxxx.co.nz
          tomcatId=nodeX <-- jvmRoute name

          [ajp13:nodeX.xxxxx.co.nz:8009]
          channel=channel.socket:nodeX.xxxxx.co.nz:8009

          2) On each tomcat server inside the tomcat configuration deploy/jbossweb-tomcat41.sar/META-INF/jboss-service.xml

          look for your tomcat engine