On Thu, Feb 5, 2015 at 10:22 PM, Chris <k...@adobe.com> wrote:
> Hello,
>
> We have some complex logic in our application that will at times determine
> that the response to a specific query should be delayed.  Currently this is
> handled in the application with a short (~100ms) sleep.
>
> We would like to move this delay in response to the load balancer.  I have
> tried to do this by adding a response header as a flag for HAProxy to act on
> and adding configuration like the following to the backend:
>
>   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
>
> With the above configuration, the response is delayed until the client times
> out (2 minutes) regardless of how trigger_delay evaluates.
>
> The following configurations exhibit the same behavior:
>
>   tcp-response inspect-delay 100ms
>   tcp-response content accept if WAIT_END
>
>     - or -
>
>   acl trigger_delay res.hdr(response-delay) -m found
>   tcp-response inspect-delay 100ms
>   tcp-response content accept unless trigger_delay
>
>
> It seems that either a header-based ACL or WAIT_END cause any tcp-response
> inpect-delay to timeout.  It does not seem to matter if the header-based ACL
> returns true or false.  Are they not compatible with a response delay?
>
>
> Ideally when we encounter the delay flag in the response of the app server,
> we would also add the src to a stick-table for reference in delaying
> subsequent incoming connections from that IP (maybe the next, say 5 minutes
> or so).  Is this possible/reasonable?
>
> Thank you,
>
> Chris
>

Hi Chris,

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

Because here you propose a response (which doesn't work) to a problem
you're facing without explaining us the problem.
So it's hard to help.

Baptiste

Reply via email to