We have HAProxy 1.4 successfully performing sticky session routing based on a value in the request querystring with the following configuration command.
balance url_param userId
This works great and if application server A fails, then you can see subsequent requests being routed to a new target server B which is the desired behaviour.
However, if application server A comes back online we see the requests for certain users once again being routed there which causes the users to experience 2 dropped sessions instead of just 1.
Is there any way to tell HAProxy to pin requests for active sessions to server B for some minimum timeout period so that requests only return to Server A once those user sessions have expired?