Re: [PATCH] : Prevent redispatcher from selecting the same server

From: Krzysztof Oledzki <ole#ans.pl>
Date: Fri, 8 Feb 2008 10:27:42 +0100 (CET)

On Thu, 7 Feb 2008, Willy Tarreau wrote:

> On Tue, Feb 05, 2008 at 09:46:42PM +0100, Krzysztof Oledzki wrote:
>>
>>
>> On Mon, 4 Feb 2008, Krzysztof Oledzki wrote:
>>
>>> From 7ece40b892a91f0d7fc673b6e5977766ab3e047b Mon Sep 17 00:00:00 2001
>>> From: Krzysztof Piotr Oledzki <ole#ans.pl>
>>> Date: Sun, 3 Feb 2008 23:44:44 +0100
>>> Subject: [MAJOR]: Prevent redispatcher from selecting the same server
>>>
>>> When haproxy decides that session needs to be redispatched it chose a
>>> server,
>>> but there is no guarantee for it to be a different than the current one.
>>> So,
>>> it often happens that selected server is exactly the same that it was
>>> previously and client ends up with a 503 error anyway, especially when one
>>> sever has much bigger weight than others.
>>>
>>> This patch fixes FWRR and RR algos. It also delays SN_DIRECT/SN_REDISP
>>> operations and http_flush_cookie_flags call so they are executed only when
>>> a connection was truly redispatched not only intended to.
>>
>> Ping? Overlook or needs more time to be audited?
>
> Well caught! I read it but let the mail marked "read" and did not notice
> it afterwards. I'll merge it too. I've not read the other ones yet, I'll
> work on that when I settle down (most likely this week-end).

OK, thanks. Just a note: if you are going to apply this ("Prevent redispatcher...") patch as is, please change "avoided = 0;" into "avoided = NULL;". Alternative, I'll send a fixed patch if you find something that needs to be changed/fixed.

Best regards,

                                 Krzysztof Olędzki Received on 2008/02/08 10:27

This archive was generated by hypermail 2.2.0 : 2008/02/08 10:30 CET