Rate-Limiting and retry-after header

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:


Hi guys,

sorry to follow up on this, but at least anybody knows if this is just not possible? Is there any other way to get (paid) help/ support? I already tried to get paid support from haproxy.com, but they only support their Enterprise Edition :frowning:

Thank you