netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Seamless Service Restart / Port Takeover
@ 2011-10-12 16:53 Olaf van der Spek
  2011-10-12 17:14 ` Rick Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Olaf van der Spek @ 2011-10-12 16:53 UTC (permalink / raw)
  To: netdev

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?

Olaf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Seamless Service Restart / Port Takeover
  2011-10-12 16:53 Seamless Service Restart / Port Takeover Olaf van der Spek
@ 2011-10-12 17:14 ` Rick Jones
  2011-10-13  9:56   ` Olaf van der Spek
  0 siblings, 1 reply; 3+ messages in thread
From: Rick Jones @ 2011-10-12 17:14 UTC (permalink / raw)
  To: Olaf van der Spek; +Cc: netdev

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Seamless Service Restart / Port Takeover
  2011-10-12 17:14 ` Rick Jones
@ 2011-10-13  9:56   ` Olaf van der Spek
  0 siblings, 0 replies; 3+ messages in thread
From: Olaf van der Spek @ 2011-10-13  9:56 UTC (permalink / raw)
  To: Rick Jones; +Cc: netdev

On Wed, Oct 12, 2011 at 7:14 PM, Rick Jones <rick.jones2@hp.com> wrote:
> 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.

Hi Rick,

That sounds rather complicated. What daemons implement the
functionality this way?
I think an easier way to accomplish this would be quite welcome.

Olaf

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-13  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-12 16:53 Seamless Service Restart / Port Takeover Olaf van der Spek
2011-10-12 17:14 ` Rick Jones
2011-10-13  9:56   ` Olaf van der Spek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).