Forum Moderators: phranque

Message Too Old, No Replies

sticky session in mod proxy balancer in apache

         

satheeshkumar

11:18 am on May 28, 2011 (gmt 0)

10+ Year Member



Hi,

I am using an apache webserver in front end and two tomcat servers as backend servers. I am loadbalancing between 2 tomcat using apache mod_proxy_balancer package.

my configuration is below:

<IfModule mod_proxy_balancer.c>
<Location "/balancer-manager">
SetHandler balancer-manager
Order deny,allow
# Deny from all
# Allow from local subnet only
Allow from all
</Location>

<Proxy balancer://ncpcluster>
BalancerMember [147.243.196.25:8080...] route=route1
BalancerMember [147.243.196.24:8080...] route=route2
#BalancerMember [147.243.205.33:8080...]
lbmethod=byrequests
</Proxy>

ProxyPass /lbtest balancer://ncpcluster/lbtest/


ProxyPass /admin balancer://ncpcluster/admin/ stickysession=jsessionid
ProxyPassReverse /admin balancer://ncpcluster/admin/

</IfModule>

It is redircting to two servers. but The session is not maintaining. I am not able to access and alter the cookie in the application side. so is there any way to set a new cookie for This load balancer alone?

Please tell me if anybody know how to do this in webserver(sticky session without any change in application side).