httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amol Puglia <>
Subject [users@httpd] apache mod_proxy_balancer is not redirecting user request evenly to bakcend tomcat servers.
Date Mon, 11 Feb 2013 08:52:59 GMT
Hello Team,

I have configured loadbalancing using apache web server with mod_proxy and mod_proxy_balancer

I am having following versions of apache and tomcat 

Apache web server version :- Server version: Apache/2.2.16 (Unix)
Server built:   Sep 27 2010 12:48:44

Tomcat Application Server :- Apache Tomcat/6.0.26

Now the issue is the load is not balanced properly between the tomcat servers in the backend.
It means there are more users are on some tomcat and less users on other tomcats.
I wanted to distribute equal loads on all tomcats.
Kindly give me suggestions.
Let me know if any information is required.

Below is the configuration of loadbalancer in httpd.conf file.

# Port 80
   Listen server1:80
   <VirtualHost _default_:80>
      ServerName server1
        ServerAlias sev2
        <Directory /app>

        Order deny,allow

        Deny from all

        Allow from


      Timeout 3600
      ProxyTimeout 3600
      ProxyRequests Off
      ProxyPass /app balancer://cluster stickysession=JSESSIONID|jsessionid nofailover=On
      ProxyPreserveHost On
      ProxyPass /app ajp://server2:8009/app
      ProxyPass /app ajp://server2:8010/app
      ProxyPass /app ajp://server2:8011/app
      ProxyPass /app ajp://server2:9009/app
      ProxyPass /app ajp://server2:9010/app
      ProxyPass /app ajp://server2:9011/app

      ProxyPassReverse /app ajp://server2:8009/app
      ProxyPassReverse /app ajp://server2:8010/app
      ProxyPassReverse /app ajp://server2:8011/app
      ProxyPassReverse /app ajp://server2:9009/app
      ProxyPassReverse /app ajp://server2:9010/app
      ProxyPassReverse /app ajp://server2:9011/app
       <Proxy balancer://cluster>
         BalancerMember ajp://server2:8009/app route=marsprod_rmiserver_1 loadfactor=33
         BalancerMember ajp://server2:8010/app route=marsprod_rmiserver_2 loadfactor=33
         BalancerMember ajp://server2:8011/app route=marsprod_rmiserver_3 loadfactor=33
         BalancerMember ajp://server2:9009/app route=marsprod_rmiserver_4 loadfactor=33
         BalancerMember ajp://server2:9010/app route=marsprod_rmiserver_5 loadfactor=33
         BalancerMember ajp://server2:9011/app route=marsprod_rmiserver_6 loadfactor=33
         ProxySet lbmethod=bybusyness

       #Status page for balancer

       <Location /balancer>
       SetHandler balancer-manager
       Order Deny,Allow
       Deny from all
       Allow from all

      ProxyStatus On
      <Location /status>
      SetHandler server-status
      Order Deny,Allow
      Deny from all
      Allow from all

      ErrorLog /opt/web/apache/app/logs/error.log

View raw message