Re:File Descriptor Transfer over Unix Domain Sockets
by kortilla on Monday November 02, 2020 @03:34AM
(#24965804)
That only works when a session is a 1:1 relationship with a connection (e.g. a TCP service with sessions that can’t span TCP connections). That assumption falls apart with UDP, multiple TCP connections sharing session identifiers, etc.
The world of QUIC means the kernel is a little too out of the loop for this to easily work.
Re:File Descriptor Transfer over Unix Domain Sockets
by geocar on Monday November 02, 2020 @02:55AM
(#24965602)
If you can do that, maybe you can just use SO_REUSEPORT and arrange for SIGTERM to close the listening socket before going into the drain phase.
Re:File Descriptor Transfer over Unix Domain Sockets
by WJW on Monday November 02, 2020 @09:48AM
(#24968661)
SO_REUSEPORT has only been supported since about 2013 though, the trick with passing the fd over a Unix socket has worked for way longer than that.
Re:File Descriptor Transfer over Unix Domain Sockets
by anonymoushn on Monday November 02, 2020 @04:55AM
(#24966306)
That does seem like it would have worked and been easier.
I have done this for an RTMP server. It worked out pretty well.