Split clients

The split clients module provides a resource-efficient way to split the visitor base into subgroups, based on the percentages that you specify. To distribute visitors into one group or another, Nginx hashes a value that you provide (such as the visitor's IP address, cookie data, query arguments, and so on) and decides which group the visitor should be assigned to. The following example configuration divides visitors up into three groups based on their IP address. If a visitor is assigned to the first 50 percent, the value of $variable will be set to group1:

split_clients "$remote_addr" $variable { 
  50% "group1"; 
  30% "group2"; 
  20% "group3"; 
} 
location ~ .php$ { 
  set $args "${query_string}&group=${variable}"; 
} 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.237.26