3 Replies Latest reply on Jan 12, 2011 12:51 PM by Jean-Frederic Clere

    Load balancing mod_proxy

    Nikos Massios Novice

      Hello,

       

      We are using mod_proxy 1.1 on jboss 5.1 GA and apache 2.2 το cluster a web service on 4 esb servers.

       

      We are collecting statistics about which server handled which request and we get a pattern like

      ESB_LOGS_STATISTICS_BY_SERVERNAME

                             

      SERVER_NAMETOTALSUCCESSFULFAILED
      ESB1N25915883
      ESB1N14144140
      ESB2N249490
      ESB2N15555

      0

       

      The servers are identical 2 physical machines each with 2 jboss nodes.

       

      We suspect that the reason for the imbalance in the request handling is some misconfiguration in mod_proxy.

       

      Any ideas what we can look for?

       

      Nikos

        • 1. Load balancing mod_proxy
          Jean-Frederic Clere Master

          Without some information of the configuration in httpd.conf it is hard to say.

          • 2. Re: Load balancing mod_proxy
            Nikos Massios Novice

            We have traced it a bit more yesterday.

             

            We are load balancing MAINLY a web service (but there is also a web application that is managing the ESB and that is built using JSF)

             

            We found out that in mod_cluster-jboss-beans.xml.  We had the following configuration

             

            - <!--  Configuration values for the load balancer itself (must be the
                     same on all nodes in the cluster). These will be passed to the 
                     load balancer. 
              --> 
              <property name="stickySession">true</property> 
            
              <property name="stickySessionForce">false</property> 
            
              <property name="stickySessionRemove">false</property> 
            
              <property name="maxAttempts">1</property> 
            
              <property name="workerTimeout">-1</property> 
            

             

            So we were using sticking sessions. We have essentially 4 esb servers but for the time being just 2 external application servers requesting services. So what was probably happening was that only 2 esb servers were getting the requests from the 2 clients.

             

            After turning sticky session to false apache was load balancing a lot better the web service.

             

            However now we have a problem with the jsf-based console. It seems that this one needs the sticky sessions.

             

            Is it possible to balance one application using sticky sessions and another without using sticky sessions?

             

            Nikos

            • 3. Re: Load balancing mod_proxy
              Jean-Frederic Clere Master

              Is it possible to balance one application using sticky sessions and another without using sticky sessions?

              No you can't, you need to 2 differents cluster to do that.