Re: question about load balance and forwardfor

From: Willy Tarreau <w#1wt.eu>
Date: Tue, 1 Jul 2008 22:46:34 +0200


On Tue, Jul 01, 2008 at 03:51:33PM +0800, Cherife Li wrote:
> Hi, all.
>
> I haven't understood haproxy in some points.
>
> 1. If I enable both cookie-based persistence and any one of the load
> balance algorithm, then, how does haproxy select a backend?

If a persistence cookie is found and points to a valid server, it is used. Otherwise, load-balancing applies.

> 2. Situation is 'user requests' -> varnish -> haproxy -> backends, is it
> possible for haproxy to do 'source' balance? Cause I didn't find a way
> to let haproxy use the X-FORWARDED-FOR header sent by varnish. It seems
> that haproxy only captures the header in log using "capture request
> header X-Forwarded-For", right?

Yes, nobody had time to implement the IP extraction from headers in order to perform the hash. We need to be able to specify which occurrence of the header we want to hash, because X-Forwarded-For is a typical case of multiple value header.

Regards,
Willy Received on 2008/07/01 22:46

This archive was generated by hypermail 2.2.0 : 2008/07/01 23:01 CEST