Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_core_module.xml @ 767:1bb8b733416a
Clarified the description of the limit_rate directive
and fixed the description of the $limit_rate variable.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Fri, 16 Nov 2012 18:53:36 +0000 |
parents | ddec437b692b |
children | f63b7fa3bf17 |
comparison
equal
deleted
inserted
replaced
766:0c5d885656af | 767:1bb8b733416a |
---|---|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
9 | 9 |
10 <module name="Module ngx_http_core_module" | 10 <module name="Module ngx_http_core_module" |
11 link="/en/docs/http/ngx_http_core_module.html" | 11 link="/en/docs/http/ngx_http_core_module.html" |
12 lang="en" | 12 lang="en" |
13 rev="9"> | 13 rev="10"> |
14 | 14 |
15 <section id="directives" name="Directives"> | 15 <section id="directives" name="Directives"> |
16 | 16 |
17 <directive name="aio"> | 17 <directive name="aio"> |
18 <syntax> | 18 <syntax> |
955 <context>if in location</context> | 955 <context>if in location</context> |
956 | 956 |
957 <para> | 957 <para> |
958 Rate limits the transmission of a response to a client. | 958 Rate limits the transmission of a response to a client. |
959 The <value>rate</value> is specified in bytes per second. | 959 The <value>rate</value> is specified in bytes per second. |
960 Value 0 (the default) disables rate limiting. | 960 The value 0 disables rate limiting. |
961 <!-- | 961 <!-- |
962 The smaller the rate, the more accurate will be the limitation. | 962 The smaller the rate, the more accurate will be the limitation. |
963 --> | 963 --> |
964 The limit is per connection, so if a single client opens 2 connections, | 964 The limit is set per request, so if a client simultaneously opens |
965 an overall rate will be 2x more than specified by this directive. | 965 two connections, an overall rate will be twice as much |
966 </para> | 966 as the specified limit. |
967 | 967 </para> |
968 <para> | 968 |
969 This directive is not applicable if one wants to rate limit | 969 <para> |
970 a group of clients on the | 970 Rate limit can also be set in the <var>$limit_rate</var> variable. |
971 <link id="server"/> | 971 It may be useful in cases where rate should be limited |
972 level. | 972 depending on a certain condition: |
973 If that is the case, the desired limit can be specified in the | |
974 <var>$limit_rate</var> | |
975 variable: | |
976 <example> | 973 <example> |
977 server { | 974 server { |
978 | 975 |
979 if ($slow) { | 976 if ($slow) { |
980 set $limit_rate 4k; | 977 set $limit_rate 4k; |
985 </example> | 982 </example> |
986 </para> | 983 </para> |
987 | 984 |
988 <para> | 985 <para> |
989 In addition, rate limit can also be set in the | 986 In addition, rate limit can also be set in the |
990 <header>X-Accel-Limit-Rate</header> response header field. | 987 <header>X-Accel-Limit-Rate</header> header field of a proxied server response. |
991 This ability can be disabled using the | 988 This ability can be disabled using the |
992 <link doc="ngx_http_proxy_module.xml" id="proxy_ignore_headers"/> | 989 <link doc="ngx_http_proxy_module.xml" id="proxy_ignore_headers"/> |
993 and | 990 and |
994 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_ignore_headers"/> | 991 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_ignore_headers"/> |
995 directives. | 992 directives. |
2768 or an empty string otherwise | 2765 or an empty string otherwise |
2769 </tag-desc> | 2766 </tag-desc> |
2770 | 2767 |
2771 <tag-name><var>$limit_rate</var></tag-name> | 2768 <tag-name><var>$limit_rate</var></tag-name> |
2772 <tag-desc> | 2769 <tag-desc> |
2773 allows for connection rate limiting | 2770 setting this variable allows for response rate limiting; |
2771 see <link id="limit_rate"/> | |
2774 </tag-desc> | 2772 </tag-desc> |
2775 | 2773 |
2776 <tag-name><var>$nginx_version</var></tag-name> | 2774 <tag-name><var>$nginx_version</var></tag-name> |
2777 <tag-desc> | 2775 <tag-desc> |
2778 nginx version | 2776 nginx version |