I
tried your suggestion but couldn't get it working for me. It got
me thinking, though, and what I did was add a different JSP page to the
application that sets a cookie, correctly formatted (you're right it expects
the cookie to be 'value.route') to indicate the server that it came from,
and then redirects to the start page of the application. That works
a treat for our purposes.
Although I am not very experienced in using proxy_balancer, I did experiment
with it a little bit a while ago.
>From what I remember, it expects the route to be appended to the balancer
cookie value. In your example it is expecting a cookie of JSESSIONID=0000K8zpkCtCy6l9Y91Q86bETpX:-1.1
or JSESSIONID=0000K8zpkCtCy6l9Y91Q86bETpX:-1.2
If a valid route is not found in the cookie, it will not apply stickiness.
Unless you can actually yourself determine part of the value of JSESSIONID
in order to include a route which can be interpreted by proxy_balancer,
JSESSIONID is not a good balancer cookie. What I did myself was to set
a cookie on the browser whenever I detected a request not containing a
balancer cookie.
Another way of setting the cookie would be to direct a request not containing
a cookie to a specific path on the application server, let the balancer
determine which application server that should be, and let the application
server set a cookie corresponding to itself.
It would be interesting to know what others are doing on that subject.
-ascs
________________________________
De : Brendan.McKenna@xxxxxxxxx [mailto:Brendan.McKenna@xxxxxxxxx]
Envoyé : mardi 8 janvier 2008 13:06
À : users@xxxxxxxxxxxxxxxx
Objet : Load balancing problem
Hi,
I am running httpd version 2.2.6 on Windows
XP SP2. I am trying to use sticky sessions to route users to a server,
based on the value of the JSESSIONID cookie in their request. While
the load balancing does appear to work, the sticky sessions don't appear
to be working. My configuration looks like this:
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
" from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________