[PATCH 0 of 6] QUIC packet routing improvements
arut at nginx.com
Fri Dec 9 09:38:46 UTC 2022
Tha patchset addresses the packet routing problem in current QUIC
implementation. The problem is how to route a QUIC datagram to the right nginx
worker. The simplest and currently available solution is to use SO_REUSEPORT
(SO_REUSEPORT_LB in FreeBSD) socket option, which allows to route a packet
based on client/server address pair. The downside of the solution is not
handling nginx reloads/restarts properly.
Also, basic eBPF routing is currently implemented which supports client
migration, but it also breaks on reloads and restarts. Details are in ,
which is my previous attempt to address the issue.
Two solutions are implemented.
Patch #5 improves the QUIC eBPF module to properly handle nginx reloads and
restarts. Each QUIC listening allocates several worker sockets which handle
existing worker connections. The main QUIC UDP sockets only handle new
connections and are inherited as usual. A reuseport eBPF program routes
a packet to a worker socket based on its DCIDs or to a main sockets based on
the address hash.
Patch #6 adds experimental support for UDP client sockets. This is a direct
analogy with TCP listen/accept model.
More information about the nginx-devel