Re: Reread of config without restart

From: Michael Rennt <>
Date: Wed, 12 Mar 2008 10:56:16 +0100

Willy Tarreau wrote:
> On Tue, Mar 11, 2008 at 07:50:06PM +0100, Michael Rennt wrote:

>> Willy Tarreau wrote:
>>> On Tue, Mar 11, 2008 at 05:00:27PM +0100, Michael Rennt wrote:
>>>> Hi,
>>>> just tested it and it's working fine.
>>>> Where is haproxy retaining the persistence database or is the old process 
>>>> actually handing over the persistence information to the new one in 
>>>> memory?
>>> no, and generally speaking, you should as most as possible avoid to 
>>> maintain
>>> any state in any equipment. Persistence is the worst thing to maintain 
>>> because
>>> (when it is possible), it costs a lot and is generally a sign of poor 
>>> initial
>>> design.
>>> Simply insert a cookie for your persistence and have any process and/or any
>>> machine be able to replace the first one at any time.
>> But how is persistence solved with source based balancing for example? How 
>> is haproxy maintaining the mapping of source ip to the destination server?

> There is no IP-based persistence. If you need to use IP address, you use
> address hashing. But generally this is not used since this is a poor and
> unefficient solution to apply persistence.
>> Also, how is query hashing realized? Do you put the hash into a cookie?

> No, the hash is computed everytime it is needed, and the result is used to
> select the server. But once again, hashing does not provide persistence. In
> fact, it's even an alternative which is often acceptable when persistence
> is not an option. In fact, I'm not sure I really understand your problem.

Well, it's rather a thing of understanding.

We are currently using a commercial software extension to LVS called B100, which is not maintained/sold as standalone software anymore.

Just like other loadbalancers it has several balancing algorithms, like roundrobin, source persistence, cookie persistence, query hash persistence.

Query hash means, the LB is looking at a specified query string (i.e. search=something) in order to build a hash out of it. Users returning with the exact same query string get directed to the same frontend until a timeout is reached. If the timeout is reached, the hash to frontend mapping is cleared.

When I talk about source persistence, I mean that a user that has been directed to a frontend will always return to the same frontend until a timeout is reached and the mapping of source ip to frontend is cleared as well.

You say there is no ip-based persistence, so what does source persistence mean in haproxy terms?

Just in case you are interested, I could send you the manual of the B100 as PDF, which includes detailed descriptions of the way the balancing is done.


Michael Received on 2008/03/12 10:56

This archive was generated by hypermail 2.2.0 : 2008/03/12 11:00 CET