Hi, Better using stick tables with store-response and store-request to replace your appsession configuration. that way, you can reload your haproxy without loosing persistence information. It also allows you to have a cluster of HAProxy sharing the same persistence information.
Baptiste On Wed, Apr 3, 2013 at 11:08 AM, sol myr <[email protected]> wrote: > Hi, > > We set up HAProxy with stickiness ("appsession"), and usually it works > great. > But unfortunately, after failover it seems to stop "sticking" and just do > round robin. > We got the problem on both 1.4 and 1.5. > > The details - it's a backend of 3 Tomcat servers, with stickiness based on > "myCookie". > backend tom > balance leastconn > server tom1 t1.mycompany.com:80 check > server tom2 t2.mycompany.com:80 check > server tom3 t3.mycompany.com:80 check > appsession myCookie len 32 timeout 3h request-learn > > Initially it works: I send several requests with the same cookie > "myCookie=1" and see they all go to the same Tomcat - say "tom1". > But if I crash tom1, and send more requests with the same "myCookie=1", > they starts round robin between tom2 and tom3... I expected them all to > stick to one of those servers. > > Am I missing something silly? > With Google I only fished one old vague reference: > http://www.mail-archive.com/[email protected]/msg02632.html > It mentioned "I know about the drawbacks of appsession, i.e. in memory > hash lost on relad or failover" - but the reply implied a fix on 1.5...? > > Thanks very much >

