Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: limit_req
- To: nginx-ru@xxxxxxxxx
- Subject: Re: limit_req
- From: Konstantin Svist <fry.kun@xxxxxxxxx>
- Date: Sun, 02 Jan 2011 12:01:11 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=BT8SqaoaWot2uY7wG3N2BmBlX6BQwf81MMbNPMi2mD8=; b=FlYffTL6LO4iZSQylke9Mqce6Wu8B2BgvHhQl1wHKUwyV7M9d5JOjYFg84kJWxuvYw 2wSsrfz7VTt4hfgnJYT+NijJSv8VzJ8WyS8nm+qylarMuLxzsukxx2x1r0YNXd6UqiZP y4VedVp/EMoOzQB0thE7CSyaaxjM+UUYDFxjI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=hm9N8NLQ1i8+rg5m9lXhtIsUe/lG0Bj/uvg8FfGu4eOlQ+pqVAAD2oD4gaVyJtdwU7 QjgO8ZeNM8+Cgs0+O8Kul4vOmxQxyy2mpxRus30PD0nbmKpxzjU3MNuLL33y+rNOvuqd 14aIODYio3JurboHwbF9Sm4ulzP+HN/8ApJI0=
- In-reply-to: <C6B3C963-CD05-4C64-B447-4C82FDEFCD60@xxxxxxxxx>
- References: <C6B3C963-CD05-4C64-B447-4C82FDEFCD60@xxxxxxxxx>
On 01/02/2011 11:40 AM, Евгений Торопов wrote:
Добрый вечер,
nginx version: nginx/0.8.54
Отрывок из конфига:
...
limit_req_zone $binary_remote_addr zone=test:10m rate=10000r/s;
location /some/url {
limit_req zone=test;
}
...
Даже при таком огромном рейте видим в error log-е:
...
2011/01/02 19:35:44 [error] 8663#0: *21852 limiting requests, excess: 1.000 by zone "test", client:
xxx.xxx.xxx.xxx, server: site.com, request: "POST /some/url HTTP/1.0", host:
"www.site.com"
2011/01/02 19:35:44 [error] 8663#0: *21853 limiting requests, excess: 1.000 by zone "test", client:
xxx.xxx.xxx.xxx, server: site.com, request: "POST /some/url HTTP/1.0", host:
"www.site.com"
2011/01/02 19:35:44 [error] 8663#0: *21849 limiting requests, excess: 1.000 by zone "test", client:
xxx.xxx.xxx.xxx, server: site.com, request: "POST /some/url HTTP/1.0", host:
"www.site.com"
2011/01/02 19:35:44 [error] 8663#0: *21850 limiting requests, excess: 1.000 by zone "test", client:
xxx.xxx.xxx.xxx, server: site.com, request: "POST /some/url HTTP/1.0", host:
"www.site.com"
...
Расскажите, пожалуйста, как такое возможно.
Спасибо.
Евгений
jt@xxxxxxxxx
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
Включите параметр burst=X
Без параметра burst, если новый запрос пришёл в течении 1s/10000 = 10us
от прежде отработанного, то он будет отброшен.
Если же есть burst=X, то до X новых запросов будут отработаны, но
интервал будет увеличен каждый раз на 10us. Если придёт >X запросов в
интервале, они будут отрублены.
HTH
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|