Mercurial > hg > nginx-site
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/http/ngx_http_split_clients_module.xml Mon Jan 23 16:50:35 2012 +0000 @@ -0,0 +1,70 @@ +<?xml version="1.0"?> + +<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> + +<module name="Module ngx_http_split_clients_module" + link="/en/docs/http/ngx_http_split_clients_module.html" + lang="en"> + +<section id="summary"> + +<para> +The <literal>ngx_http_split_clients_module</literal> module creates +variables suitable for A/B testing, also known as split testing. +</para> + +</section> + + +<section id="example" name="Example Configuration"> + +<para> +<example> +http { + split_clients "${remote_addr}AAA" $variant { + 0.5% .one; + 2.0% .two; + * ""; + } + + server { + location / { + index index${variant}.html; +</example> +</para> +</section> + + +<section id="directives" name="Directives"> + +<directive name="split_clients"> +<syntax block="yes"> + <value>string</value> + <value>$variable</value></syntax> +<default/> +<context>http</context> + +<para> +Creates a variable for A/B testing, for example: +<example> +split_clients "${remote_addr}AAA" $variant { + 0.5% .one; + 2.0% .two; + * ""; +} +</example> +The value of the original string is hashed using MurmurHash2. +In the example given, hash values from 0 to 21474836 (0.5%) +correspond to the <var>$variant</var> variable taking the +value <literal>".one"</literal>, +hash values from 21474837 to 107374182 (2%) correspond to +the value <literal>".two"</literal>, +and hash values from 107374183 to 4294967297 correspond to +the value <literal>""</literal>. +</para> + +</directive> + +</section> + +</module>