Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4849

Rate-Limiting and retry-after header

$
0
0

Hi guys,

I’m using haproxy 2.5 and have some basic rate limiting configured like this (the actual configuration contains more rules for different urls):

backend test
  acl rate_limit_by_ip_exceeds_limit src,table_http_req_rate(rate_limit_by_ip) gt 100
  http-request deny deny_status 429 if rate_limit_by_ip_exceeds_limit
  http-request track-sc0 src table rate_limit_by_ip
  ...

backend rate_limit_by_ip
  stick-table type ipv6 size 1m expire 24h store http_req_rate(5m)

Is there any way to include a “retry-after” header in case the rate limit is exceeded? And especially, how to calculate the value of that header? I used Caddy before, and it provided this header out of the box (GitHub - mholt/caddy-ratelimit: HTTP rate limiting module for Caddy 2).

Thanks for any help! :slight_smile:

Corin

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>