Mercurial > hg > nginx-site
annotate xml/ru/docs/stream/ngx_stream_split_clients_module.xml @ 1851:9463f1412255
Documented ngx_google_perftools_module.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Mon, 05 Dec 2016 21:01:46 +0300 |
parents | 42d2806f5b28 |
children |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
1 <?xml version="1.0"?> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
466
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
466
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
466
diff
changeset
|
5 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
466
diff
changeset
|
6 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 |
1752
b4de612feff8
Documented the split_clients module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
775
diff
changeset
|
9 <module name="Модуль ngx_stream_split_clients_module" |
b4de612feff8
Documented the split_clients module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
775
diff
changeset
|
10 link="/ru/docs/stream/ngx_stream_split_clients_module.html" |
589 | 11 lang="ru" |
1759
42d2806f5b28
Updated example in ngx_stream_split_clients_module with variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1752
diff
changeset
|
12 rev="2"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
13 |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
108
diff
changeset
|
14 <section id="summary"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
15 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 <para> |
1752
b4de612feff8
Documented the split_clients module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
775
diff
changeset
|
17 Модуль <literal>ngx_stream_split_clients_module</literal> (1.11.3) создаёт |
b4de612feff8
Documented the split_clients module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
775
diff
changeset
|
18 переменные для A/B тестирования (также известного как “split-тестирование”). |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
19 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
20 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
21 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
22 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
23 |
342 | 24 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
25 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
26 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
27 <example> |
1752
b4de612feff8
Documented the split_clients module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
775
diff
changeset
|
28 stream { |
1759
42d2806f5b28
Updated example in ngx_stream_split_clients_module with variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1752
diff
changeset
|
29 ... |
42d2806f5b28
Updated example in ngx_stream_split_clients_module with variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1752
diff
changeset
|
30 split_clients "${remote_addr}AAA" $upstream { |
42d2806f5b28
Updated example in ngx_stream_split_clients_module with variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1752
diff
changeset
|
31 0.5% feature_test1; |
42d2806f5b28
Updated example in ngx_stream_split_clients_module with variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1752
diff
changeset
|
32 2.0% feature_test2; |
42d2806f5b28
Updated example in ngx_stream_split_clients_module with variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1752
diff
changeset
|
33 * production; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 } |
1759
42d2806f5b28
Updated example in ngx_stream_split_clients_module with variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1752
diff
changeset
|
35 |
42d2806f5b28
Updated example in ngx_stream_split_clients_module with variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1752
diff
changeset
|
36 server { |
42d2806f5b28
Updated example in ngx_stream_split_clients_module with variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1752
diff
changeset
|
37 ... |
42d2806f5b28
Updated example in ngx_stream_split_clients_module with variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1752
diff
changeset
|
38 proxy_pass $upstream; |
42d2806f5b28
Updated example in ngx_stream_split_clients_module with variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1752
diff
changeset
|
39 } |
42d2806f5b28
Updated example in ngx_stream_split_clients_module with variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1752
diff
changeset
|
40 } |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
41 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
42 </para> |
364 | 43 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
44 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
45 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
46 |
342 | 47 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
48 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
49 <directive name="split_clients"> |
342 | 50 <syntax block="yes"> |
51 <value>строка</value> | |
52 <value>$переменная</value></syntax> | |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
53 <default/> |
1752
b4de612feff8
Documented the split_clients module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
775
diff
changeset
|
54 <context>stream</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
55 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
56 <para> |
342 | 57 Создаёт переменную для A/B тестирования, например: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
58 <example> |
342 | 59 split_clients "${remote_addr}AAA" $variant { |
60 0.5% .one; | |
61 2.0% .two; | |
62 * ""; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
63 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
64 </example> |
342 | 65 Значение исходной строки хэшируется с помощью MurmurHash2. |
466
74736c333906
Corrected boundaries of the example ranges.
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
66 В приведённом примере при значениях хэша от 0 до 21474835 (0.5%) |
342 | 67 переменная <var>$variant</var> получит значение <literal>".one"</literal>. |
466
74736c333906
Corrected boundaries of the example ranges.
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
68 При значениях хэша от 21474836 до 107374180 (2%) — <literal>".two"</literal>. |
775
813b8349cdbe
Expanded the literal empty strings into words.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
69 И при значениях хэша от 107374181 до 4294967295 — <literal>""</literal> |
813b8349cdbe
Expanded the literal empty strings into words.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
70 (пустая строка). |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
71 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
72 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
73 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
74 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
75 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
76 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
77 </module> |