Thanks Willy. I'll need to get up to speed on using ACL's and multiple
backends. I'll scrape together a config and then post back if I can't
figure it out. This will be excellent if I can get it to work.
Brian Koloszyc
CREATIVE MERCHANDISE, LLC | p. 415.787.4824 | f. 415.276.3180
On 04/08/2010 02:21 PM, Willy Tarreau wrote:
> On Thu, Apr 08, 2010 at 02:17:31PM -0700, Brian Koloszyc wrote:
>
>> Hi,
>>
>> I'm wondering if it is possible to load balance using the User-Agent
>> string with the "balance hdr(User-Agent)" option?
>>
> yes but I'm not sure it's of any use. Hash-based balance algorithms
> are efficient when the population is very large and well distributed.
> Here you'll mainly have 4-5 different user agents, some of which may
> land on the same server, so the balancing could be very poor.
>
>
>> For example, ideally I would like to have haproxy inspect the User-Agent
>> header string, and if the User-Agent = x then send traffic to server A,
>> else send traffic to server B.
>>
> OK so it's different. The first solution above might work by pure luck.
> Here if you know that one specific user agent should be sent to one
> specific server, use two backends with an ACL to decide which one to
> use depending on the header.
>
> Regards,
> Willy
>
>
Received on 2010/04/08 23:32
This archive was generated by hypermail 2.2.0 : 2010/04/08 23:45 CEST