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