view xml/ru/docs/http/ngx_http_split_clients_module.xml @ 2769:16f6fa718be2

Updated TLSv1.3 support notes. Previous notes described some early development snapshot of OpenSSL 1.1.1 with disabled TLSv1.3 by default. It was then enabled in the first alpha. Further, the updated text covers later major releases such as OpenSSL 3.0.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 30 Sep 2021 16:29:20 +0300
parents 813b8349cdbe
children
line wrap: on
line source

<?xml version="1.0"?>

<!--
  Copyright (C) Igor Sysoev
  Copyright (C) Nginx, Inc.
  -->

<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">

<module name="Модуль ngx_http_split_clients_module"
        link="/ru/docs/http/ngx_http_split_clients_module.html"
        lang="ru"
        rev="2">

<section id="summary">

<para>
Модуль <literal>ngx_http_split_clients_module</literal> создаёт переменные для
A/B тестирования (также известного как “split-тестирование”).
</para>

</section>


<section id="example" name="Пример конфигурации">

<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="Директивы">

<directive name="split_clients">
<syntax block="yes">
    <value>строка</value>
    <value>$переменная</value></syntax>
<default/>
<context>http</context>

<para>
Создаёт переменную для A/B тестирования, например:
<example>
split_clients "${remote_addr}AAA" $variant {
               0.5%               .one;
               2.0%               .two;
               *                  "";
}
</example>
Значение исходной строки хэшируется с помощью MurmurHash2.
В приведённом примере при значениях хэша от 0 до 21474835 (0.5%)
переменная <var>$variant</var> получит значение <literal>".one"</literal>.
При значениях хэша от 21474836 до 107374180 (2%) — <literal>".two"</literal>.
И при значениях хэша от 107374181 до 4294967295 — <literal>""</literal>
(пустая строка).
</para>

</directive>

</section>

</module>