Sticky Session / Session Persistence

I have two back-end and i am using Round-Robin to load balance.
I want to configure Haproxy like, If my one back-end_1 goes down, the traffic of back-end_1 will keep on same back-end_1, whether it is down. it should not route on back-end_2. and show some error for those user who are on back-end_1.

and back-end_2 is working and all new traffic will serve by back-end_2.

can we do that ?

What sort of persistence are you using because if using cookie persistence with “option redispacth” disabled I think it should be unable to break persistence and just throw an error to the user:

1 Like