Mercurial > hg > nginx-site
comparison xml/en/docs/stream/ngx_stream_proxy_module.xml @ 2385:e58281e2a93f
Documented variables support in proxy_download_rate and proxy_upload_rate.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 21 May 2019 16:29:05 +0300 |
parents | d5e576eb7677 |
children | 375a3dfde23b |
comparison
equal
deleted
inserted
replaced
2384:144c8e3d6c09 | 2385:e58281e2a93f |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Module ngx_stream_proxy_module" | 9 <module name="Module ngx_stream_proxy_module" |
10 link="/en/docs/stream/ngx_stream_proxy_module.html" | 10 link="/en/docs/stream/ngx_stream_proxy_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="23"> | 12 rev="24"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The <literal>ngx_stream_proxy_module</literal> module (1.9.0) allows proxying | 17 The <literal>ngx_stream_proxy_module</literal> module (1.9.0) allows proxying |
140 The limit is set per a connection, so if nginx simultaneously opens | 140 The limit is set per a connection, so if nginx simultaneously opens |
141 two connections to the proxied server, | 141 two connections to the proxied server, |
142 the overall rate will be twice as much as the specified limit. | 142 the overall rate will be twice as much as the specified limit. |
143 </para> | 143 </para> |
144 | 144 |
145 <para> | |
146 The value can contain variables (1.17.0). | |
147 It may be useful in cases where rate should be limited | |
148 depending on a certain condition: | |
149 <example> | |
150 map $slow $rate { | |
151 1 4k; | |
152 2 8k; | |
153 } | |
154 | |
155 proxy_download_rate $rate; | |
156 </example> | |
157 </para> | |
158 | |
145 </directive> | 159 </directive> |
146 | 160 |
147 | 161 |
148 <directive name="proxy_next_upstream"> | 162 <directive name="proxy_next_upstream"> |
149 <syntax><literal>on</literal> | <literal>off</literal></syntax> | 163 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
583 The limit is set per a connection, so if the client simultaneously opens | 597 The limit is set per a connection, so if the client simultaneously opens |
584 two connections, | 598 two connections, |
585 the overall rate will be twice as much as the specified limit. | 599 the overall rate will be twice as much as the specified limit. |
586 </para> | 600 </para> |
587 | 601 |
602 <para> | |
603 The value can contain variables (1.17.0). | |
604 It may be useful in cases where rate should be limited | |
605 depending on a certain condition: | |
606 <example> | |
607 map $slow $rate { | |
608 1 4k; | |
609 2 8k; | |
610 } | |
611 | |
612 proxy_upload_rate $rate; | |
613 </example> | |
614 </para> | |
615 | |
588 </directive> | 616 </directive> |
589 | 617 |
590 </section> | 618 </section> |
591 | 619 |
592 </module> | 620 </module> |