Hi,

On Tue, Jul 28, 2009 at 10:54:17AM -0400, Chuck Koscher wrote:
> Hi,
> 
> This question is more for my own understanding. I'm trying to have  
> sessions sent to the proper backend server which serviced the original  
> request. From my reading of the HAproxy config docs I thought  
> 'appsession' would do the trick. However when I try the first config  
> block shown below HAproxy does not observe the JSESSIONID cookie, it  
> just keeps chugging along using round-robin.
> 
> The second config block does work.
> 
> What am I missing?

I think that it's simply because your timeout is too short, so
haproxy learns a session cookie and destroys it 5 seconds later,
so your persistence does not work if you do your clicks more
than 5s apart.

You may also be interested in using the "prefix" mode if you
want only one cookie.

Regards,
Willy

> ==== does not work
> 
> backend admin
> 
>     option httpchk GET /servlet/useragent?func=showHome
>     option httpclose
>     balance roundrobin
>     appsession JSESSIONID len 52 timeout 5000
>     server cr10 172.20.1.17:80  maxconn 50 check
>     server cr5  172.20.1.29:80  maxconn 50 check
> 
> ==== does work
> 
> backend admin
> 
>     option httpchk GET /servlet/useragent?func=showHome
>     option httpclose
>     balance roundrobin
>     cookie crsvr insert nocache
>     server cr10 172.20.1.17:80  cookie cr10 maxconn 50 check
>     server cr5  172.20.1.29:80  cookie cr5 maxconn 50 check

Reply via email to