Re: balance hdr

From: Willy Tarreau <>
Date: Thu, 19 Nov 2009 22:33:57 +0100

On Wed, Nov 18, 2009 at 07:37:38PM -0800, David Birdsong wrote:
> >From the manual:
> <snip>
> hdr(name) The HTTP header <name> will be looked up in each HTTP request.
> Just as with the equivalent ACL 'hdr()' function, the header
> name in parenthesis is not case sensitive. If the header is
> absent or if it does not contain any value, the round-robin
> algorithm is applied instead.
> </snip>
> So this balancing scheme falls back to round-robin if the header is
> not found, what method is used if it is?..does it hash on the value of
> the header (or the name of the header)?

The value of the header. I take note of your question an will improve the doc on this point, as after re-reading it, I agree that it is not obvious.

> This question could extend to url_param, so if the param is found in
> the GET string or in the body of the POST, what next? What balance
> method is used?

Same, just the value. The idea is that you generally know the variable name and want to hash on its value if it's present. Most often it will be a client ID or session ID.

Willy Received on 2009/11/19 22:33

This archive was generated by hypermail 2.2.0 : 2009/11/19 22:45 CET