On Sun, Mar 29, 2009 at 07:46:05PM +0200, benoit wrote: > Jeffrey 'jf' Lim a écrit : > >On Wed, Mar 25, 2009 at 8:02 PM, Benoit <maver...@maverick.eu.org> wrote: > > > >>diff -ru haproxy-1.3.15.7/doc/configuration.txt > >>haproxy-1.3.15.7-cur/doc/configuration.txt > >>--- haproxy-1.3.15.7/doc/configuration.txt 2008-12-04 > >>11:29:13.000000000 +0100 > >>+++ haproxy-1.3.15.7-cur/doc/configuration.txt 2009-02-24 > >>16:17:19.000000000 +0100 > >>@@ -788,6 +788,19 @@ > >> > >> balance url_param <param> [check_post [<max_wait>]] > >> > >>+ header The Http Header specified in argument will be looked > >>up in > >>+ each HTTP request. > >>+ > >>+ With the "Host" header name, an optionnal > >>use_domain_only > >>+ parameter is available, for reducing the hash > >>algorithm to > >>+ the main domain part, eg for "haproxy.1wt.eu", only > >>"1wt" > >>+ will be taken into consideration. > >>+ > >> > > > >I'm not so sure how balancing based on a hash of the Host header would > >be useful. How would this be useful? I would see an application for > >balancing on perhaps other headers (like xff as mentioned), but for > >Host... I dunno... (so basically what I'm saying is, is the code for > >the 'use_domain_only' bit useful? can it be left out?) > > > >-jf > Well, at least it's usefull for our business, it's why it's here :) > It's aimed at a shared hosting environmen, with multiple host > entry pointing to differents web sites. The objective was to > maximise caching efficiency and response times by 'sticking' > a site to a backend server. The use_domain_only was here to > reduce the hashing to the most significative part and help with > site using many tld for language selection.
BTW Benoit, be careful, you left some fprintf() in your patch. Regards, Willy