Welcome! Log In Create A New Profile

Advanced

Re: Rate limiting by percentage

Igor A. Ippolitov
January 26, 2017 02:46AM
Hello,

Have a look at split_clients which does something similar:
http://nginx.org/en/docs/http/ngx_http_split_clients_module.html

You can use resulting variable to select upstream, response or whatever
you need.

On 25.01.2017 03:01, Thangamani J wrote:
> Hi team,
>
> I'm in process of implementing following use case, please help me with
> your inputs.
>
> let's say I have endpoint /rate-limit and it should
> 75% of time, it should return "SUCCESS" as text
> 25% of time, it should return "FAILED" as text
>
> I did try limit_req_zone which goes by request per second and when
> exceeds it responds with status code 503. But in this case i want an
> actual response and the percentage of FAILED/SUCCESS to be configurable.
>
> Any pointers for above use case would be helpful.
>
> Thanks,
> Thanga.
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx


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

Rate limiting by percentage

Thangamani J January 24, 2017 07:02PM

Re: Rate limiting by percentage

Francis Daly January 25, 2017 02:10PM

Re: Rate limiting by percentage

Igor A. Ippolitov January 26, 2017 02:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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