Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_split_clients_module.xml @ 348:5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
ngx_http_realip_module, ngx_http_secure_link_module,
ngx_http_split_clients_module, and ngx_http_sub_module.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 23 Jan 2012 16:50:35 +0000 |
parents | |
children | bb51d3e17dd0 |
comparison
equal
deleted
inserted
replaced
347:daae2b619815 | 348:5a848934a12d |
---|---|
1 <?xml version="1.0"?> | |
2 | |
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | |
4 | |
5 <module name="Module ngx_http_split_clients_module" | |
6 link="/en/docs/http/ngx_http_split_clients_module.html" | |
7 lang="en"> | |
8 | |
9 <section id="summary"> | |
10 | |
11 <para> | |
12 The <literal>ngx_http_split_clients_module</literal> module creates | |
13 variables suitable for A/B testing, also known as split testing. | |
14 </para> | |
15 | |
16 </section> | |
17 | |
18 | |
19 <section id="example" name="Example Configuration"> | |
20 | |
21 <para> | |
22 <example> | |
23 http { | |
24 split_clients "${remote_addr}AAA" $variant { | |
25 0.5% .one; | |
26 2.0% .two; | |
27 * ""; | |
28 } | |
29 | |
30 server { | |
31 location / { | |
32 index index${variant}.html; | |
33 </example> | |
34 </para> | |
35 </section> | |
36 | |
37 | |
38 <section id="directives" name="Directives"> | |
39 | |
40 <directive name="split_clients"> | |
41 <syntax block="yes"> | |
42 <value>string</value> | |
43 <value>$variable</value></syntax> | |
44 <default/> | |
45 <context>http</context> | |
46 | |
47 <para> | |
48 Creates a variable for A/B testing, for example: | |
49 <example> | |
50 split_clients "${remote_addr}AAA" $variant { | |
51 0.5% .one; | |
52 2.0% .two; | |
53 * ""; | |
54 } | |
55 </example> | |
56 The value of the original string is hashed using MurmurHash2. | |
57 In the example given, hash values from 0 to 21474836 (0.5%) | |
58 correspond to the <var>$variant</var> variable taking the | |
59 value <literal>".one"</literal>, | |
60 hash values from 21474837 to 107374182 (2%) correspond to | |
61 the value <literal>".two"</literal>, | |
62 and hash values from 107374183 to 4294967297 correspond to | |
63 the value <literal>""</literal>. | |
64 </para> | |
65 | |
66 </directive> | |
67 | |
68 </section> | |
69 | |
70 </module> |