Hello Team,
I have configured loadbalancing using apache web server with mod_proxy and mod_proxy_balancer module.
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 153.88.251.174 153.88.251.160 153.88.251.165 153.88.251.170 153.88.251.212 153.88.251.199
</Directory>
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 retry=60
BalancerMember ajp://server2:8010/app route=marsprod_rmiserver_2 loadfactor=33 retry=60
BalancerMember ajp://server2:8011/app route=marsprod_rmiserver_3 loadfactor=33 retry=60
BalancerMember ajp://server2:9009/app route=marsprod_rmiserver_4 loadfactor=33 retry=60
BalancerMember ajp://server2:9010/app route=marsprod_rmiserver_5 loadfactor=33 retry=60
BalancerMember ajp://server2:9011/app route=marsprod_rmiserver_6
loadfactor=33 retry=60
ProxySet lbmethod=bybusyness
</Proxy>
#Status page for balancer
<Location /balancer>
SetHandler balancer-manager
Order Deny,Allow
Deny from all
Allow from all
</Location>
ProxyStatus On
<Location /status>
SetHandler
server-status
Order Deny,Allow
Deny from all
Allow from all
</Location>
ErrorLog /opt/web/apache/app/logs/error.log
</VirtualHost>