Mercurial > hg > ngx_http_upstream_keepalive
comparison README @ 7:c1a2ef20a2a7
Keepalive: add license and some documentation.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 24 Oct 2008 02:06:56 +0400 |
parents | |
children | f3e74fbd0f0b |
comparison
equal
deleted
inserted
replaced
6:bef88ba0b378 | 7:c1a2ef20a2a7 |
---|---|
1 Keepalive balancer module for nginx. | |
2 | |
3 This module implements cache for backend connections. As of now, it may | |
4 be used with memcached upstreams. | |
5 | |
6 Note: don't even try it with http backends. It won't work. | |
7 | |
8 Note: it's for nginx 0.7.* and won't work with nginx 0.6.*. | |
9 | |
10 Configuration directives: | |
11 | |
12 keepalive <num> [single] | |
13 | |
14 Scope: upstream | |
15 | |
16 Switches on keepalive module for the upstream in question. | |
17 | |
18 Parameters: | |
19 | |
20 - <num> | |
21 Maximum number of connections to cache. If there isn't enough | |
22 room to cache new connections - last recently used connections | |
23 will be kicked off the cache. | |
24 | |
25 - single | |
26 Treat everything as single host. With this flag connections | |
27 to different backends are treated as equal. | |
28 | |
29 Sample configuration: | |
30 | |
31 upstream memd { | |
32 server 127.0.0.1:11211; | |
33 server 10.0.0.2:11211; | |
34 keepalive 10; | |
35 } | |
36 | |
37 This module was tested to work with standard round-robin balancing, but | |
38 it's believed to be compatible with more sophisticated balancers. The only | |
39 requirement is to activate them *before* this module, e.g.: | |
40 | |
41 upstream memd { | |
42 server 127.0.0.1:11211; | |
43 server 10.0.0.2:11211; | |
44 ip_hash; | |
45 keepalive 10; | |
46 } | |
47 | |
48 To compile nginx with keepalive module, use "--add-module <path>" option to | |
49 nginx configure. |