2 ms·
TFA is about handing over server sockets, so that the new version can deal with new connections while the old version deals with old connections. I have done t
by anonymoushn 6y ago
TFA is about handing over server sockets, so that the new version can deal with new connections while the old version deals with old connections.
I have done this for an RTMP server. It worked out pretty well.
- geocar 6y agoIf 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.
- anonymoushn 6y agoThat does seem like it would have worked and been easier.
- WJW 6y agoSO_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.
- kortilla 6y agoThat 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.