You’ll have to properly configure the following options:
(They are named both cookie
but serve different purposes.)
However, if your application requires sticky sessions, then sooner or later you’ll end-up in trouble, especially if your servers get over-loaded or start failing intermittently. (I would strongly suggest looking into the application’s manual and see if there is any way in which they can use for example Memcache or similar to share the session information.)
Else you are using HAProxy just for “routing” at HTTP level based on these persistence cookies, and you won’t obtain any “high-availability”… (Granted if one of the servers goes down, traffic will be dispatched to the other live ones, but the users will have to re-login.)
Furthermore, as the documentation states, you’ll have to be extra careful about any Cache-Control
headers emitted by the servers.