Hi,

Currently, you can only do this based on source IP address.
I know Willy is working to improve this and in1.5-dev9 you'll be able
to do it, since you'll be able to track any users using strings (ie
your token) then apply conn_rate or sess_rate, http_req_rate, etc...
using gpc0 as a trigger.

cheers

On Wed, May 2, 2012 at 5:47 AM, Ben Hood <0x6e6...@gmail.com> wrote:
> Hi,
>
> I was wondering if HAProxy has the capability to rate limit HTTP POSTs
> based on the response from the backend.
>
> The clients identify themselves with an token passed as query
> parameter in the POST. I would like to implement the business logic
> for calculating rate limits in my backend app. If the backend decides
> that a limit has been breached for a particular client token, it would
> response with a certain non-2xx code and would supply a TTL value to
> express the period of time that the client will be throttled.
>
> Hence I was wondering whether it is possible to configure HAProxy to
> cache the fact that a given client token is to be throttled for the
> period expressed by the TTL.
>
> Any help is appreciated,
>
> Cheers,
>
> Ben
>

Reply via email to