Hi HAproxy community,

We've the following production setup, clusters of:

IPVS (dsr)  ->
L4 HAproxy (tcp termination) ->
L7 Proxy (via pp, L7 done here. Not HAproxy today, but it soon will be)

Problem statement is, how do you drain a node in L4 tier gracefully as
it has no concept of L7 constructs like "Connection: close" or "GOAWAY
h2 frames" and can't send thoseon L7 proxy's behalf. In our current L7
proxy, we've custom logic written to inspect client IP of request (=L4
node) and do the drain behavior for only those requests matching the
client IP of L4 that's going under maintenance.

However, as we're migrating to L7 HAproxy, I am unable to find a way
to initiate "soft-stop" behavior only for requests coming from a
specific upstream L4 node. Note, we already have measures in place to
stop sending new requests to L4 as soon as we initiate the maintenance
mode, this is about gracefully draining existing connections on L4
which are spread across the whole L7 cluster.

I'll be great if I can get some pointers here on what to look at, to
solve this problem.

* I already checked the HAproxy code around soft-top and
close-spread-time etc, it doesn't have any support to only drain
specific clients.
* In lua, I didn't find any methods around initiating drain for
specific requests.
* For any map (L4 client IP lookup) based solution, I was unable to
find any http-request operation that sets "drain mode".

Cheers,
Abhijeet (https://abhi.host)

Reply via email to