O que você está procurando é "sessões persistentes", e você pode usar o parâmetro appsession
no HAProxy para habilitar isso:
appsession <cookie> len <length> timeout <holdtime>
[request-learn] [prefix] [mode <path-parameters|query-string>]
When an application cookie is defined in a backend, HAProxy will check when the server sets such a cookie, and will store its value in a table, and associate it with the server's identifier. Up to characters from the value will be retained. On each connection, haproxy will look for this cookie both in the "Cookie:" headers, and as a URL parameter (depending on the mode used). If a known value is found, the client will be directed to the server associated with this value. Otherwise, the load balancing algorithm is applied. Cookies are automatically removed from memory when they have been unused for a duration longer than .
The definition of an application cookie is limited to one per backend.
Example : appsession JSESSIONID len 52 timeout 3h
Consulte a documentação do HAProxy para mais detalhes.