We have configured haproxy 1.5 and are using map-based hash (default).

For e.g. we have two backend servers. Server A and Server B.
Clients 1,2,3,4,5 will go to same backend.

For example
Client 1,2,3 are connected to Server A as per hash.
Server A is crashed.
haproxy shifts clients to Server B.
Server A recovers.
Client 4,5 are connected to Server A

Problem is that 1,2,3 remain connected with Server B but as per updated
hash, they should be connected with Server A.

We want all clients 1,2,3,4,5 to be connected to same Server.

Connection remain connected for very long time so either they need to be
forcefully disconnected if hash changes or hash should be such that it
honors already connected connections.

What hash should we use in this case or is there any other configuration
that we should be using?
Jai

Reply via email to