HAProxy community

Conditional Persistance / Affinity


I have a case where I’d like to enable persistence / affinity when needed:

For example, to keep things simple just using source IP with the following:

stick-table type ip size 1m expire 1h
stick on src
  • Is there a way I can set this up so that I can issue a command and enable this and one to disable it ?
  • Or perhaps to read a setting from disk and based on the value make it conditional ?


No, that is not possible.

Can you elaborate the use-case a little bit more? What problem are you trying to solve?