public
Fork of ry/nginx-ey-balancer
Description: nginx max connections queue
Homepage:
Clone URL: git://github.com/ezmobius/nginx-ey-balancer.git
ry (author)
Thu Jan 22 04:25:58 -0800 2009
commit  3114a13124669177acfcf3014b6ee6180d92732c
tree    6c289b63db53f7adb1691f269153f1b8b66b4781
parent  45093eaaa2a617b4c2cd4623f5b114b264aaa4fa
name age message
file Makefile Loading commit data...
file README
file config Wed Oct 29 04:02:50 -0700 2008 compiles (first time!) - outline of most of the... [ry]
file max_connections_module.c
directory patches/
directory test/
README
haproxy maxconn for nginx
Adds a request queue to Nginx that allows the limiting of concurrent requests
passed to the upstream.  "max_connections N;" in an upstream directive means
that each upstream server will be given N request at a time, per Nginx
worker. For example, if you have two workers and "max_connections 1;" then
there will be a total of 2 requests at a time on each upstream server.

Usage:

  upstream mongrels {
    server 127.0.0.1:8001;
    server 127.0.0.1:8002;
    max_connections 1;
    max_connections_queue_timeout 2s; # optional defaults to 10s
    max_connections_max_queue_length 50; # optional defaults to 10000
  }

Install:

This module requires one to patch Nginx. The module also includes a Makefile
for easily building it into Nginx and running tests. If the Makefile is used
then the first line must be changed to point to the Nginx source tree. 
Here is an example of how one might compile nginx with this module.

  tar -zxf nginx-0.6.34.tar.gz
  tar -xzf ngx_max_connections-0.0.3.tar.gz
  cd nginx-0.6.34
  patch -p0 < ../ngx_max_connections-0.0.3/patches/nginx-0.6.34.patch
  cd ../ngx_max_connections-0.0.3
  vim Makefile #### edit the first line!
  make configure
  make
  make test    #### requires ruby, rubygems, rack, and httperf