Hi Bryan,

Thanks for your answer, that does make sense. However, I tried to use
be_id() instead and I got the following error:

[ALERT] 228/053953 (26244) : parsing [/etc/haproxy/haproxy.cfg:96] :
'tcp-request content track-sc1' : fetch method 'be_id()' extracts
information from 'backend', none of which is available here

So I believe it cannon get be_id() since it is being processed on frontend
which is logical and according to documentation there are three more ids
available: dst, dst_conn, dst_port, neither of which seem to match my needs.

Any thoughts on how can I achieve per backend index on frontend side?

Appreciate your help.

On Tue, Aug 16, 2016 at 1:42 AM, Bryan Talbot <[email protected]>
wrote:

>
> 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
>
>


-- 
Artem Lalaiants
Infrastructure Engineer, GeoComply
skype: artem.kharkov
www.geocomply.com

-- 
 

*CONFIDENTIALITY NOTICE: The information contained in this email message is 
intended only for use of the intended recipient. If the reader of this 
message is not the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please 
immediately delete it from your system and notify the sender by replying to 
this email.*

Reply via email to