Add reuseport to improve performance and reduce packet drops#5275
Add reuseport to improve performance and reduce packet drops#52757heMech wants to merge 1 commit intoNginxProxyManager:developfrom
Conversation
|
This has a number of benefits, and I don't think there are any downsides, what do you think @jc21 |
|
Umm I guess it's ok. I just identified issues with I'd appreciate someone to test the image before I merge it |
|
Docker Image for build 3 is available on DockerHub: Note Ensure you backup your NPM instance before testing this image! Especially if there are database changes. Warning Changes and additions to DNS Providers require verification by at least 2 members of the community! |
|
When is the merge to be expected? |
We were discussing something similar in another PR which made it a bit more complex. But I guess since streams don't work on same ports merging this is fine? @jc21 |
Users reported extreme packet loss (up to 80%) when streaming UDP-based services like TeamSpeak 3 through Nginx Proxy Manager. This issue is primarily caused by lock contention on the UDP receive buffer when multiple Nginx worker processes compete for the same socket.
This PR enables the reuseport socket option for both TCP and UDP stream templates.
By enabling reuseport, the Linux kernel creates multiple listening sockets and balances incoming packets across workers at the kernel level. This ensures that packets from the same connection consistently reach the same worker, significantly reducing packet drops and stabilizing high-bandwidth UDP streams.
The change is compatible with Linux Kernel 3.9+ (released in 2013) or Debian 7.
Resolves #5000
Thanks to @zdzichu6969