Welcome! Log In Create A New Profile

Advanced

Re: calling unique url not more then 1 time per 5 seconds

Styopa Semenukha
May 24, 2015 11:48AM
On Sunday, May 24, 2015 11:36:47 AM Styopa Semenukha wrote:
> On Sunday, May 24, 2015 03:35:45 AM PavelPolyakov wrote:
> > Hi,
> >
> > Assuming I have an url like /payout/[hash] , where hash is something unique,
> > and I want to make, that on nginx level it's checked that this url is called
> > not more then 1 time per 5 seconds. 1st time it should be processed by
> > proxy_pass, all the other times it should be replied 403.
> >
> > Could someone tell me which approach I should use? Is that possible to do
> > that using nginx?
> >
> > Any thoughts are appreciated.
> >
> > Regards,
>
> Yes, it's possible:
> http://nginx.org/r/limit_req_zone
> >If a rate of less than one request per second is desired, it is specified in request per minute (r/m). For example, half-request per second is 30r/m.
>

This is for the case you need to impose a limit of 12r/m per the entire "/payout/" location.

But if you mean 12r/m per _individual_ hash, that might be tricky.
--
Sincerely yours,
Styopa Semenukha.

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

calling unique url not more then 1 time per 5 seconds

PavelPolyakov May 24, 2015 03:35AM

Re: calling unique url not more then 1 time per 5 seconds

Styopa Semenukha May 24, 2015 11:38AM

Re: calling unique url not more then 1 time per 5 seconds

Styopa Semenukha May 24, 2015 11:48AM

Re: calling unique url not more then 1 time per 5 seconds

Valentin V. Bartenev May 25, 2015 07:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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