On 5/11/06, Brian Rectanus <brectanu@xxxxxxxxx> wrote:
Brian Rectanus wrote: > Hello all, > > I am having problems with mod_proxy_balancer and sticky sessions in > 2.2.0 - 2.2.2. > > Here is what I have: > > NameVirtualHost *:80 > Listen 80 > <VirtualHost *:80> > ... > <Proxy balancer://apps> > BalancerMember http://server1:8000 route=server1 > BalancerMember http://server2:8000 route=server2 > </Proxy> > ProxyPass / balancer://apps/ stickysession=MYCOOKIE nofailover=On > </VirtualHost> > > This *should* balance all requests to either server1 or server2 and > append a '.server[12]' to the MYCOOKIE value. Then, on the next request > MYCOOKIE value would be something like '1234567.server1', and the route > set to server1. Is this correct? > > However, the route is not being appended to the cookie value, so the > sessions are not sticky. > > 1) Client requests main page > 2) Server sends main page w/Set-Cookie MYCOOKIE=1234567 > 3) Client makes sub-requests w/Cookie MYCOOKIE=1234567 > 4) Server balances as if no sticky sessions (no route found) > > Should 2) above be: > > 2) Server sends main page w/MYCOOKIE=1234567.server1 > > as I expect? I forgot to mention in the original post: If I modify the cookie value on the client so that it *does* append the '.server1', then all is fine and it works the way I expect. The server is just not doing that as I expect it to. Also, I have tried using this: ProxyPass /path/ balancer://apps/path/ stickysession=MYCOOKIE nofailover=On as well as: ProxySet balancer://apps stickysession=MYCOOKIE nofailover=On RewriteRule ^/(.*) balancer://apps/$1 [P,L] All had the same failed result. Thanks, -B
Well, I am still having issues with this. Anyone else seen similar results? Anyone with more experiance with balancer code know if what I am assuming to be correct is really what is *supposed* to be happening? :) Here is what I configured with if it helps: ./configure \ --with-ldap-include=$LDAP_DIR/include \ --with-ldap-lib=$LDAP_DIR/lib \ --with-ldap \ --with-ssl=$SSL_DIR \ --with-mpm=prefork \ --enable-mods-shared=all \ --enable-ssl=shared \ --enable-proxy=shared \ --enable-proxy_balancer=shared \ --enable-proxy_ajp=shared \ --enable-proxy_ftp=shared \ --enable-proxy_http=shared \ --enable-authnz-ldap=shared \ --enable-ldap \ --prefix=$PREFIX Thanks, -B --------------------------------------------------------------------- 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