Welcome! Log In Create A New Profile

Advanced

Re: Throttle requests with limit_req rate based on header from response to auth subrequest

Francis Daly
August 30, 2018 04:10AM
On Wed, Aug 29, 2018 at 07:14:01PM -0400, jarstewa wrote:

Hi there,

I do not know the answer, and I have not tested the code you provided.

But, one suggestion which might be quick for you to test:

what happens if you change all of your variable names so that they do
not start with a digit?

As in: rename $2X_key to be (for example) $a2X_key.

It is possible that "$2X_key" will be expanded as "X_key" when $2 has
no value.

> > # Throttle zones based on the results of the above mapping
> > limit_req_zone $2X_key zone=2x_zone:20m rate=10r/s;
> > limit_req_zone $3X_key zone=3x_zone:20m rate=100r/s;
> > limit_req_zone $2X_key_from_upstream zone=2x_zone_from_upstream:20m
> rate=10r/s;
> > limit_req_zone $3X_key_from_upstream zone=3x_zone_from_upstream:20m
> rate=100r/s;

If the first limit_req_zone argument is true in each case, the lowest rates is
on the first one, so that is the one that will always take effect.

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

Throttle requests with limit_req rate based on header from response to auth subrequest

jarstewa August 29, 2018 07:13PM

Re: Throttle requests with limit_req rate based on header from response to auth subrequest

Francis Daly August 30, 2018 04:10AM

Re: Throttle requests with limit_req rate based on header from response to auth subrequest

jarstewa August 30, 2018 12:53PM

Re: Throttle requests with limit_req rate based on header from response to auth subrequest

jarstewa August 30, 2018 07:47PM

Re: Throttle requests with limit_req rate based on header from response to auth subrequest

jarstewa August 30, 2018 08:13PM

Re: Throttle requests with limit_req rate based on header from response to auth subrequest

Francis Daly August 31, 2018 07:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 265
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