New patch: upstream consist hash patch

hi,all

  i has patch the upstream hash module to support consist hash.

below is patch file and patch method.

http://upstream-consist-hash.googlecode.com/files/upstream_hash.path
http://upstream-consist-hash.googlecode.com/files/nginx.path

patch method:

#patch nginx
cd nginx-0.7.17
patch -p1 < …/nginx.path

#patch upstream hash
cd nginx_upstream_hash-0.3
patch -p1 < …/upstream_hash.path

#download ketama-0.1.1.tar.bz2
cd ketama/libketama
gcc -fPIC -O3 -c md5.c
gcc -shared -o libmd5.so md5.o
cp libmd5.so /usr/local/lib
cp md5.h /usr/local/include

#in case you maybe need edit /etc/ld.so.conf to add the
/usr/local/lib path , then ldconfig

ps: thank for Evan M. give me help:)

Hello!

On Thu, Jun 11, 2009 at 08:04:41PM +0800, i_amok i_amok wrote:

hi,all

  i has patch the upstream hash module to support consist hash.

below is patch file and patch method.

http://upstream-consist-hash.googlecode.com/files/upstream_hash.path
http://upstream-consist-hash.googlecode.com/files/nginx.path

As far as I see patch to nginx itself isn’t really needed. You may
easily keep everything within the module.

And just a note: there is Tomash Brechko’s memcached_hash module
that does ketama consistent hashing among others. As far as I know
it works well. See

for details.

Maxim D.

yes , thx for you remind, just let people know there is a option to do
consistent hash for upstream hash module…:slight_smile:

2009/6/11 Maxim D. [email protected]: