What are folks using for haproxy sessions?

HAProxy offers several options to stick to a session.

  • always create cookie on its own using cookie (alwaays set, bad if varnish in front)
  • prefix existing cookie using cookie (but afaik no way to not set it)
  • reuse application session cookie appsession (deprecated, do not use)
  • create a custom table with rules and values for stickiness stick-table/stick (full flexibility!)

In Plone you probably want to stick to the current user or the language and in almost read-only intranets maybe to the a cluster of specific users (like of one department). Otherwise do not stick but do leastconn balancing.

The only way I know to achieve this is to use a stick ... rule.

Docs at https://cbonte.github.io/haproxy-dconv/configuration-1.6.html#4.2-stick%20match (and following stick*)

1 Like