]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: backend: Enhance hash-type directive with an algorithm options
authorBhaskar <bhaskar@tumblr.com>
Wed, 30 Oct 2013 03:30:51 +0000 (23:30 -0400)
committerWilly Tarreau <w@1wt.eu>
Thu, 14 Nov 2013 15:37:50 +0000 (16:37 +0100)
commit98634f0c7b8d6aff0086fef9fedd90ffc79abcc2
tree38f8dfd9fdbd5c99f288c66bda464631d3cf020f
parent60eccc18419763680f1cd08abfe8711e9170f9b0
MEDIUM: backend: Enhance hash-type directive with an algorithm options

Summary:
In testing at tumblr, we found that using djb2 hashing instead of the
default sdbm hashing resulted is better workload distribution to our backends.

This commit implements a change, that allows the user to specify the hash
function they want to use. It does not limit itself to consistent hashing
scenarios.

The supported hash functions are sdbm (default), and djb2.

For a discussion of the feature and analysis, see mailing list thread
"Consistent hashing alternative to sdbm" :

      http://marc.info/?l=haproxy&m=138213693909219

Note: This change does NOT make changes to new features, for instance,
applying an avalance hashing always being performed before applying
consistent hashing.
Makefile
doc/configuration.txt
include/common/hash.h [new file with mode: 0644]
include/types/backend.h
src/backend.c
src/cfgparse.c
src/hash.c [new file with mode: 0644]