Maintaining session persistance

From: Chuck Koscher <ckoscher#crossref.org>
Date: Tue, 28 Jul 2009 10:54:17 -0400


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?

Thanks
Chuck

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

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
Received on 2009/07/28 16:54

This archive was generated by hypermail 2.2.0 : 2009/07/28 17:00 CEST