Il 2019-02-11 6:36 Badari Prasad ha scritto:
Hi Marco
    Thank you for the response. I came up with my own haproxy cfg,
where i would want to rate limit based on event name and client id in
url.
URL ex : /api/v1/<event_name>/<clientid>

Have attached a file for my haproxy cfg.  But it does not seems to be
rate limiting the incoming requests.


Hi

I think that

http-request deny deny_status 429 if { path_beg /api/v1/monitoring-event/A000001 AND monte_as1_exceeds_limit }

is incorrect. I guess that the rule should be

http-request deny deny_status 429 if { path_beg /api/v1/monitoring-event/A000001 } monte_as1_exceeds_limit


But... since I always do a mess in mixing ACL formats, I would rewrite the rule as

acl api_url path_beg /api/v1/monitoring-event/A000001
http-request deny deny_status 429 if api_url monte_as1_exceeds_limit


Ciao!

.marcoc

Reply via email to