You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Brian Rectanus <br...@gmail.com> on 2006/05/11 22:10:43 UTC
[users@httpd] Re: mod_proxy_balancer stickysession issues
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
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: mod_proxy_balancer stickysession issues
Posted by Brian Rectanus <br...@gmail.com>.
On 5/11/06, Brian Rectanus <br...@gmail.com> 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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org