Re: reloading haproxy

From: Willy Tarreau <w#1wt.eu>
Date: Sun, 17 May 2009 09:24:05 +0200


Hi Adrian,

On Thu, May 14, 2009 at 03:33:39PM +0200, Adrian Moisey wrote:
> Hi
>
> I tried that, also gave the same result.

What is happening is that the new haproxy process asks the old one to release the ports so that it can bind to them. So there exists a short period of time (a few hundreds of microseconds) during which neither the old nor the new process owns the port.

This does not happen if your system supports SO_REUSEPORT (such as various BSDs, as well as Linux kernels which have my patch applied). On those systems, the new process can bind to the port eventhough the old one is already bound, so there is absolutely 0 downtime.

Anyway in production it will not matter at all, because in practice, when a browser faces a connection abort, it retries after a few hundreds of milliseconds, when the new process is already in place. And this will only concern the very few requests which can happen during the switch.

Last, as John said, please ensure to always use -sf instead of -st if you want your reload to really remain unnoticed, since -st kills terminates connections.

Regards,
Willy Received on 2009/05/17 09:24

This archive was generated by hypermail 2.2.0 : 2009/05/17 09:30 CEST