> On Aug 15, 2016, at Aug 15, 2:00 AM, Artem Lalaiants <[email protected]> 
> wrote:
> 
> Hello,
> 
> Can somebody the http_req_rate counter still counts requests with the 
> following configuration even after all the traffic starts coming through 
> "error" backend only?
> 
> frontend all-requests 0.0.0.0:80 <http://0.0.0.0/>
>         tcp-request content track-sc0 fe_id() table es_backend
>         use_backend error_429 if { sc_http_req_rate(0) gt 9 }
> backend es_backend
>         stick-table size 1 expire 10s type integer store http_req_rate(10s)
> backend error_429
>     mode http
>     errorfile 429 /etc/haproxy/errors/429rate.http
> 
> I expect http_req_rate to be decreased once the traffic goes to another 
> backend (error_429 in my case). Am I missing something and how it can be 
> achieved?
> 


You’re tracking based on the id of the frontend so no matter what backend is 
used, the key for fe_id() is still incremented for the request.

-Bryan

Reply via email to