Hello there,
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.
RewriteMap bID rnd:/path/balancers.map
RewriteCond %{HTTP_COOKIE} !BALANCER=route
RewriteRule . - [CO=BALANCER:route.${bID:rand}:%{ENV:domain}]
The balancers.map file may contain:
rnd 1|2|3|4
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.
RewriteCond %{HTTP_COOKIE} !BALANCER=route
RewriteRule . /myapp/setbalancercookieandcreatesessionobject
or something like that.
It would be interesting to know what others are doing on that subject.
-ascs
________________________________
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Envoyé : mardi 8 janvier 2008 13:06
À : [email protected]
Objet : [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]