# HG changeset patch # User Maxim Dounin # Date 1224799616 -14400 # Node ID c1a2ef20a2a79f1c92fb3365bcfa83fdf551a3a3 # Parent bef88ba0b37850c114dfa121027b7900caab0aaf Keepalive: add license and some documentation. diff --git a/LICENSE b/LICENSE new file mode 100644 --- /dev/null +++ b/LICENSE @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2008 Maxim Dounin + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ diff --git a/README b/README new file mode 100644 --- /dev/null +++ b/README @@ -0,0 +1,49 @@ +Keepalive balancer module for nginx. + +This module implements cache for backend connections. As of now, it may +be used with memcached upstreams. + +Note: don't even try it with http backends. It won't work. + +Note: it's for nginx 0.7.* and won't work with nginx 0.6.*. + +Configuration directives: + + keepalive [single] + + Scope: upstream + + Switches on keepalive module for the upstream in question. + + Parameters: + + - + Maximum number of connections to cache. If there isn't enough + room to cache new connections - last recently used connections + will be kicked off the cache. + + - single + Treat everything as single host. With this flag connections + to different backends are treated as equal. + +Sample configuration: + + upstream memd { + server 127.0.0.1:11211; + server 10.0.0.2:11211; + keepalive 10; + } + +This module was tested to work with standard round-robin balancing, but +it's believed to be compatible with more sophisticated balancers. The only +requirement is to activate them *before* this module, e.g.: + + upstream memd { + server 127.0.0.1:11211; + server 10.0.0.2:11211; + ip_hash; + keepalive 10; + } + +To compile nginx with keepalive module, use "--add-module " option to +nginx configure.