Welcome! Log In Create A New Profile

Advanced

Re: rate limit by header or API key

Francis Daly
March 27, 2021 05:52AM
On Thu, Mar 25, 2021 at 03:48:41PM -0500, Andy Meadows wrote:

Hi there,

> using nginx open source, is there an option to provide a custom rate limit
> by user agent, http header value, or an API key? Looking for the best
> option to provide custom rate limits to named users, but the traffic is
> coming from unpredictable IP addresses.

"limit_rate" (http://nginx.org/r/limit_rate) can control the
kbps-response-writing speed of a single request, using whatever criteria
you like, using things that are available at response-writing time.

"limit_req" (http://nginx.org/r/limit_req) and limit_req_zone can control
the rate of incoming requests that are processed, using whatever criteria
you like, using things that are available at request-reading time.

I'm not aware of a way to trivially combine the two.

Cheers,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

rate limit by header or API key

Andy Meadows March 25, 2021 04:50PM

Re: rate limit by header or API key

Francis Daly March 27, 2021 05:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 295
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready