Route to the same instance for the same client


I’m planning to use HAProxy for TCP (not HTTP/HTTPS) traffic load balancing. Does HAProxy support routing to the same instance for the same client? For example, if client A is routed to instance B for the first time and disconnects. Next time, it tries to connect again, how to ensure that A is routed to B?

There are a lot of options to ensure subsequent session go to the same backend server.

source IP hashing, cookies, session ID stickiness are features that haproxy can use to make this happen for example.

Also see: