Welcome! Log In Create A New Profile

Advanced

Re: Несколько вопросов по limit req

Валентин Бартенев
June 29, 2012 05:58AM
On Friday 29 June 2012 12:19:55 ALex_hha wrote:
> Есть 4 зоны: статика, динамика
> (передается на апач), download файлов (через
> апач, локейшен ^/file\-) и кеш (средствами
> nginx).
>
> limit_req_zone $binary_remote_addr zone=static:16m rate=100r/s;
> limit_req_zone $binary_remote_addr zone=dynamic:16m rate=5r/s;
> limit_req_zone $binary_remote_addr zone=download:8m rate=2r/s;
> limit_req_zone $binary_remote_addr zone=cache:8m rate=200r/s;
>
> server {
> limit_req zone=static burst=10 nodelay;
> ...
> location / {
> limit_req zone=dynamic burst=5 nodelay;
> proxy_pass ...
> ...
> }
>
> location = / {
> limit_req zone=cache burst=50 nodelay;
> proxy_pass ...
> ...
> proxy_cache wholepage;
> proxy_cache_valid 200 301 302 304 1h;
> proxy_ignore_headers "Cache-Control" "Expires";
> ...
> }
>
> location = /about.html {
> limit_req zone=cache burst=50 nodelay;
> proxy_pass ...
> ...
> proxy_cache wholepage;
> proxy_cache_valid 200 301 302 304 1h;
> proxy_ignore_headers "Cache-Control" "Expires";
> ...
> }
>
> location @apache {
> limit_req zone=dynamic burst=5 nodelay;
> proxy_pass ...
> ...
> }
>
> location ~* ^/file\- {
> limit_req zone=download burst=1 nodelay;
> try_files $uri @apache;
> }
> }
>
> Собственно вопрос к location ~* ^/file\- какой
> лимит будет применен? Т.е. с какой
> скоростью будут передаваться через
> этот location запросы на @apache?
>

Будет применяться "limit_req zone=download burst=1 nodelay;"

--
Валентин Бартенев
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Re: Несколько вопросов по limit req

Валентин Бартенев June 29, 2012 05:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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