On Wed, Apr 28, 2010 at 11:46:30AM -0400, John Marrett wrote: > I've noticed some interesting behaviour with persistance cookies and > haproxy. > > Let's say you use the following settings in your haproxy.cfg: > > cookie SERVERID insert indirect > server static1 172.25.0.10:1080 cookie server1 check inter 15s > server static2 172.25.0.11:1080 cookie server2 check inter 15s > > Any time haproxy receives a request that has no SERVERID cookie it will > set one. Unfortunately, this doesn't take into consideration the > cachability of the request. If a user receives a set-cookie in their > response, on cacheable content, and if the proxy server isn't configured > to strip Set-Cookie responses when serving from cache, all users of that > proxy server will persist to a single backend server.
That's why you should always use "cookie SERVERID insert indirect nocache" in case of doubt :-) Willy

