From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Jones Subject: Re: Seamless Service Restart / Port Takeover Date: Wed, 12 Oct 2011 10:14:00 -0700 Message-ID: <4E95CAD8.3050405@hp.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: Olaf van der Spek Return-path: Received: from g5t0009.atlanta.hp.com ([15.192.0.46]:37778 "EHLO g5t0009.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753329Ab1JLRZ3 (ORCPT ); Wed, 12 Oct 2011 13:25:29 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On 10/12/2011 09:53 AM, Olaf van der Spek wrote: > Hi, > > When restarting a service, a webserver for example, you'd like this to > be seamless for clients. Often, first a signal is send to the old > process to close listening sockets, then the new process is started. > This has both a race condition (sometimes 'avoided' with a sleep in > between) and service interruption. > Wouldn't it be possible to introduce mv / move like behaviour, where > the socket can be rebound without races and without interruption? I believe you can do that today if you write the application such that the old instance, before it closes the listen endpoint and terminates, instead passes access to it to the new instance via a Unix domain socket between the two. rick jones