On Thu, 19 Aug 2010 04:14:35 -0400
"Wang, Wei" <[email protected]> wrote:

> Hi,
> 
> In TCP mode, the client is balanced according to IP address, right?

No, each connection is balanced according the algorithm you specify an
"balance" line (roundrobin by default)

> And if several users send request from the same IP, does HAProxy route
> them to the same server ?

it depends, see above.

> How can we change the default balancing rule.

"balance" line in your backend/listen section

> Now if client A,B, C come from the same source IP address, can HAProxy
> always send A to server X and send B to server Y and send C to server
> Z.
> 
> I see the pattern fetch functions is src, dst, dst_port.
> Is there another something for identifying users from the same IP
> address

this kind of feature relies on decoding the protocol inside tcp, and as
of today, only http is supported. btw advanced stickiness with
"stick match" and other "stick" keywords has been added for this
purpose. Check http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
Section 7.8 to know what is supported today.

Regards,

Hervé.

-- 
Hervé COMMOWICK, EXOSEC (http://www.exosec.fr/)
ZAC des Metz - 3 Rue du petit robinson - 78350 JOUY EN JOSAS
Tel: +33 1 30 67 60 65  -  Fax: +33 1 75 43 40 70
mailto:[email protected]

Reply via email to