> Could you let us know why exactly you need to delay responses???

This is an API.

Unfortunately, the client behavior we are looking to address here cannot be
identified by client IP, ID, or anything else in the request.  In fact, it
cannot be identified until the server has gone through considerable work to
building up the response.

We still want to answer the client, but we know that as soon as we do the
client will come back with other, similar requests.  We cannot typically
slow subsequent requests by IP as this will affect large numbers of clients
behind proxy servers.  We have found that the only reasonable way to slow
the client's behavior is to slow the response.  This has proven to be quite
effective in our particular situation.

Currently the server delays the response after it is built, but instead we
would like to be able to add a "magic" header to the response that directs
HAProxy to delay it.

Is this possible?  Playing in a sandbox environment I have not been able to
get HAProxy to delay a response using "tcp-response inspect-delay".  It
either answers immediately or the client times out.


> >
> >   acl trigger_delay res.hdr(response-delay) -m found
> >   tcp-response inspect-delay 100ms
> >   tcp-response content accept unless trigger_delay
> >   tcp-response content accept if WAIT_END
> >



Reply via email to