Welcome! Log In Create A New Profile

Advanced

Re: Nginx Rate limiting for HTTPS requests

Maxim Dounin
May 21, 2018 12:46PM
Hello!

On Mon, May 21, 2018 at 09:55:20AM -0400, rickGsp wrote:

> >>I'm pretty sure the problem is with your tests, not with nginx
> >>request rate limiting. Unfortunately, it is not possible to
> >>reproduce your tests and check what's going wrong as you are using
> >>proprietary software for tests.
>
> >>As suggested previously, it might be a good idea to verify numbers
> >>using nginx access logs. Seeing numbers of requests per seconds
> >>should be as trivial as
>
> >>grep ' 200 ' /path/to/log | awk '{print $4}' | uniq -c
>
> >>assuming default log format and only test requests in the log.
>
> Hi Maxim,
>
> Here is a piece of output for the following command as per our success
> return value as 202.
> grep ' 202 ' /path/to/log | awk '{print $4}' | uniq -c
>
> 232 [17/May/2018:03:46:03
> 171 [17/May/2018:03:46:04
> 101 [17/May/2018:03:46:05
> 124 [17/May/2018:03:46:06
> 169 [17/May/2018:03:46:07
> 105 [17/May/2018:03:46:08
> 5 [17/May/2018:03:46:09
> 1 [17/May/2018:03:46:08
> 218 [17/May/2018:03:46:09
> 104 [17/May/2018:03:46:10
> 269 [17/May/2018:03:46:11
> 130 [17/May/2018:03:46:12
> 97 [17/May/2018:03:46:13
> 96 [17/May/2018:03:46:14
> 124 [17/May/2018:03:46:15
> 248 [17/May/2018:03:46:16
> 237 [17/May/2018:03:46:17
> 126 [17/May/2018:03:46:18

This certainly does not look right. Either there are some
unrelated requests in the log, or requests are not limited as it
can be expected from your configuration. Some additional things
to check:

- Make sure the $host variable you use for the limiting is not
empty and not changed between requests created by your testing
tool. Try logging the variable to see if it changes or not.
Alternatively, replace it with a static string to see if it helps.

- Make sure there are no unrelated requests in the log. In
particular, you may want to use different logs in the server{}
block you are limiting and in the http{} block.

- Try another tool to see if you are able to reproduce the same
effect. Something simple like "ab" or "http_load" might be a
good choice.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx Rate limiting for HTTPS requests

rickGsp May 15, 2018 12:20PM

Re: Nginx Rate limiting for HTTPS requests

Maxim Dounin May 15, 2018 01:58PM

Re: Nginx Rate limiting for HTTPS requests

rickGsp May 16, 2018 05:00AM

Re: Nginx Rate limiting for HTTPS requests

Maxim Dounin May 16, 2018 09:28AM

Re: Nginx Rate limiting for HTTPS requests

rickGsp May 20, 2018 04:24AM

Re: Nginx Rate limiting for HTTPS requests

pbooth May 20, 2018 02:48PM

Re: Nginx Rate limiting for HTTPS requests

pbooth May 20, 2018 02:54PM

Re: Nginx Rate limiting for HTTPS requests

rickGsp May 21, 2018 01:09AM

Re: Nginx Rate limiting for HTTPS requests

Maxim Dounin May 21, 2018 08:14AM

Re: Nginx Rate limiting for HTTPS requests

rickGsp May 21, 2018 09:55AM

Re: Nginx Rate limiting for HTTPS requests

Maxim Dounin May 21, 2018 12:46PM

Re: Nginx Rate limiting for HTTPS requests

rickGsp May 22, 2018 12:37PM

Re: Nginx Rate limiting for HTTPS requests

Maxim Dounin May 22, 2018 02:02PM

Re: Nginx Rate limiting for HTTPS requests

rickGsp May 23, 2018 12:58AM

Re: Nginx Rate limiting for HTTPS requests

Maxim Dounin May 23, 2018 03:36PM

Re: Nginx Rate limiting for HTTPS requests

rickGsp May 25, 2018 01:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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