Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_upstream_module.xml @ 1230:6cc809881694
Upstream: added the "hash" directive.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 17 Jun 2014 17:05:37 +0400 |
parents | 9264fdb6c833 |
children | ab2ea38f3512 |
comparison
equal
deleted
inserted
replaced
1229:7dd620e507c3 | 1230:6cc809881694 |
---|---|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
9 | 9 |
10 <module name="Module ngx_http_upstream_module" | 10 <module name="Module ngx_http_upstream_module" |
11 link="/en/docs/http/ngx_http_upstream_module.html" | 11 link="/en/docs/http/ngx_http_upstream_module.html" |
12 lang="en" | 12 lang="en" |
13 rev="23"> | 13 rev="24"> |
14 | 14 |
15 <section id="summary"> | 15 <section id="summary"> |
16 | 16 |
17 <para> | 17 <para> |
18 The <literal>ngx_http_upstream_module</literal> module | 18 The <literal>ngx_http_upstream_module</literal> module |
296 </para> | 296 </para> |
297 | 297 |
298 </directive> | 298 </directive> |
299 | 299 |
300 | 300 |
301 <directive name="hash"> | |
302 <syntax><value>key</value> [<literal>consistent</literal>]</syntax> | |
303 <default/> | |
304 <context>upstream</context> | |
305 <appeared-in>1.7.2</appeared-in> | |
306 | |
307 <para> | |
308 Specifies a load balancing method for a server group | |
309 where client-server mapping is based on the hashed <value>key</value> value. | |
310 The <value>key</value> can contain text, variables, and their combinations. | |
311 Note that adding or removing a server from the group | |
312 may result in remapping most of the keys to different servers. | |
313 The method is compatible with the | |
314 <link url="http://search.cpan.org/perldoc?Cache%3A%3AMemcached">Cache::Memcached</link> | |
315 Perl library. | |
316 </para> | |
317 | |
318 <para> | |
319 The <literal>consistent</literal> parameter specifies that | |
320 the <link url="http://www.last.fm/user/RJ/journal/2007/04/10/392555/">ketama</link> | |
321 consistent hashing method should be used instead. | |
322 The method ensures that only a few keys | |
323 will be remapped to different servers | |
324 when a server is added to or removed from the group. | |
325 This helps to achieve a higher cache hit ratio for caching servers. | |
326 The method is compatible with the | |
327 <link url="http://search.cpan.org/perldoc?Cache%3A%3AMemcached%3A%3AFast">Cache::Memcached::Fast</link> | |
328 Perl library with the <value>ketama_points</value> parameter is set to 160. | |
329 </para> | |
330 | |
331 </directive> | |
332 | |
333 | |
301 <directive name="ip_hash"> | 334 <directive name="ip_hash"> |
302 <syntax/> | 335 <syntax/> |
303 <default/> | 336 <default/> |
304 <context>upstream</context> | 337 <context>upstream</context> |
305 | 338 |