QUIC restarts, slow problems: udpgrm to the rescue
May 7, 2025Marek Majkowski

Summary
This post introduces udpgrm, a new daemon designed to facilitate graceful restarts for UDP servers. It leverages Linux's SO_REUSEPORT socket option and eBPF programs for stateful flow tracking. The core mechanism involves creating 'socket generations' where new instances create a new generation while old instances maintain existing ones. udpgrm manages the eBPF program and the 'working generation' pointer to route new flows, and uses configurable 'flow dissectors' to identify established flows and their corresponding sockets, preserving flow stickiness. It also provides administrative CLI tools for inspecting reuseport groups, sockets, and metrics.