changeset 7:c1a2ef20a2a7

Keepalive: add license and some documentation.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 24 Oct 2008 02:06:56 +0400
parents bef88ba0b378
children 565939797f5c
files LICENSE README
diffstat 2 files changed, 74 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
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.
+ *
+ */
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 <num> [single]
+
+        Scope: upstream
+
+        Switches on keepalive module for the upstream in question.
+
+        Parameters:
+
+            - <num>
+              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 <path>" option to
+nginx configure.