Hi, Thanks for the information. That was sad to hear. In our case the traffic is coming from servers and not a web browser so solving this with cookies are not an option. The communication between the servers are based on international standards as such we cannot add additional requirements to the server sending the requests. As such we have to solve it within our infrastructure. With a little help from HA-proxy you could then create very efficient local caches on each node, but without we need complicated and resource intensive shared caches or databases.
I hope this would be a feature that is possible to add in the future as it would help to develop simpler and more efficient applications behind HA-Proxy, which in large part can rely in local caches. Best Regards, Gisle On 19/03/2018, 09:31, "Willy Tarreau" <w...@1wt.eu> wrote: Hi, On Fri, Mar 16, 2018 at 12:31:47PM +0000, Gisle Grimen wrote: > Hi, > > We are using HA-Proxy with sticky routing in front of our cluster. Is there a > way to get HA-Proxy to add or set an header on a forwarded request when > HA-Proxy "breaks" sticky routing i.e. when forwarding the request to another > server then the one indicated in the sticky table? No, there is no such thing. You have this information in the logs however. The difficulty lies with adding some information late in the LB+connection process, as they happen after headers are processed. There is one exception to this, "option http-send-name-header", which is able to rewind the stream and insert a server name after the LB is performed, and it has been causing tons of bugs alone for more than two years because it's very tricky. I think that it would not be very difficult to implement something adding a header containing the ID of the initial server that the stickiness was expecting however. This way it could allow your servers to see that the initial name is not the one they expected and deduce the stickiness is broken. I don't know if that could suit your needs, nor if anyone would be willing to work on this (maybe you would ?). Regards, Willy