[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160324182115.GA7678@1wt.eu>
Date: Thu, 24 Mar 2016 19:21:15 +0100
From: Willy Tarreau <w@....eu>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Tolga Ceylan <tolga.ceylan@...il.com>,
Tom Herbert <tom@...bertland.com>, cgallek@...gle.com,
Josh Snyder <josh@...e406.com>,
Aaron Conole <aconole@...heb.org>,
"David S. Miller" <davem@...emloft.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as
drain mode
On Thu, Mar 24, 2016 at 07:00:11PM +0100, Willy Tarreau wrote:
> Since it's not about
> load distribution and that processes are totally independant, I don't see
> well how to (ab)use BPF to achieve this.
>
> The pattern is :
>
> t0 : unprivileged processes 1 and 2 are listening to the same port
> (sock1@...1) (sock2@...2)
> <------ listening ------>
>
> t1 : new processes are started to replace the old ones
> (sock1@...1) (sock2@...2) (sock3@...3) (sock4@...4)
> <------ listening ------> <------ listening ------>
>
> t2 : new processes signal the old ones they must stop
> (sock1@...1) (sock2@...2) (sock3@...3) (sock4@...4)
> <------- draining ------> <------ listening ------>
>
> t3 : pids 1 and 2 have finished, they go away
> (sock3@...3) (sock4@...4)
> <------ gone -----> <------ listening ------>
>
Thinking a bit more about it, would it make sense to consider that in order
to address such a scenario, the only the new (still privileged) process
reconfigures the BPF to deliver traffic only to its own sockets and that
by doing so it will result in the old one not to receive any of it anymore ?
If so that could possibly be reasonably doable then. Ie: the old processes
don't have to do anything to stop receiving traffic.
Thanks,
Willy
Powered by blists - more mailing lists