Yichun Zhang (agentzh)
January 06, 2014 02:34PM
Hello!

On Thu, Jan 2, 2014 at 12:54 PM, theotow wrote:
>
> Any Ideas if this is possible with the limit_rate of the http core module
> and lua?
>

You can use ngx_lua alone to do this.

> If it would be possible to make 2 zone dicts where the ips of the the slow
> and fast connections are in. And if someone ratelimit is dropped his ip gets
> removed from the slow dict and added to the fast dict.
>
> https://github.com/chaoslawful/lua-nginx-module#ngxshareddict
>

Yes, you can surely do that. You can use ngx.sleep() to hold back the
exceeding clients without blocking other requests served by the same
nginx worker.

Regards,
-agentzh

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

dynamic rate limiting per ip

theotow January 02, 2014 03:54PM

Re: dynamic rate limiting per ip

theotow January 06, 2014 11:07AM

Re: dynamic rate limiting per ip

Yichun Zhang (agentzh) January 06, 2014 02:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 215
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready