On Tue, May 8, 2012 at 12:26 AM, S Ahmed <sahmed1...@gmail.com> wrote:
> I'm sure this isn't possible but it would be cool if it is.
>
> My backend services write to redis, and if a client reaches a certain
> threshold, I want to hard drop all further requests until x minutes have
> passed.
>
> Would it be possible, for each request, haproxy performs a lookup in redis,
> and if a 0 is returned, drop the request completly (hard drop), if it is 1,
> continue processing.
>
>


It would introduce latency in the request processing.
Why would you need such way of serving your request?

By the way, this is not doable with HAProxy.
Well, at least, not out of the box :)
Depending on your needs, you could hack some dirty scripts which can
sync your redis DB with HAProxy server status through the stats
socket.

cheers

Reply via email to