2 Replies Latest reply on Aug 6, 2005 3:15 PM by burakbayramli

    Stickiness and load balancing does not work at the same time

    burakbayramli Newbie

      Hello, based on the info from Wiki and some other resources, I was able to setup Apache --> mod_jk --> JBoss 4.0.1 using single node. However I had problems with clustering. It seems that, I can only use sticky behavior, or load balancing, not both at the same time.

      When I changed my workers.properties file to:

      worker.node2.port=8109
      worker.node2.host=localhost
      worker.node2.type=ajp13
      worker.node2.lbfactor=100
      worker.node2.local_worker=1
      
      worker.node1.port=8209
      worker.node1.host=localhost
      worker.node1.type=ajp13
      worker.node1.lbfactor=100
      worker.node1.local_worker=1
      
      worker.loadbalancer.type=lb
      worker.loadbalancer.balanced_workers=node2,node1
      worker.loadbalancer.sticky_session=1
      worker.loadbalancer.local_worker_only=1
      


      JMeter load tests keep going to the same server. One node is not utilized at all, it is as if the second node (whichever node is listed last in the worker.loadbalancer.balanced_worker list) does not exist.

      If I comment out worker.node2.local_worker line for both nodes, then I get load balancing, but no session stickiness.

      I have checked the jmvRoute option in server.xml file, it looks OK.

      I am using Apache 1.3, JDK 1.4.2 and JBoss 4.0.1 running on SuSe 8.

      I've read JBossClustering.pdf document (which is for JBoss 3).

      Any help would be appreciated.

      Thanks,