Skip to content

Comments

Add reuseport to improve performance and reduce packet drops#5275

Open
7heMech wants to merge 1 commit intoNginxProxyManager:developfrom
7heMech:develop
Open

Add reuseport to improve performance and reduce packet drops#5275
7heMech wants to merge 1 commit intoNginxProxyManager:developfrom
7heMech:develop

Conversation

@7heMech
Copy link
Contributor

@7heMech 7heMech commented Feb 4, 2026

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

@7heMech
Copy link
Contributor Author

7heMech commented Feb 13, 2026

This has a number of benefits, and I don't think there are any downsides, what do you think @jc21

@jc21
Copy link
Member

jc21 commented Feb 17, 2026

Umm I guess it's ok. I just identified issues with reuseport in #5296 but I guess if the port number is always different in streams it should be fine.

I'd appreciate someone to test the image before I merge it

@nginxproxymanagerci
Copy link

Docker Image for build 3 is available on DockerHub:

nginxproxymanager/nginx-proxy-manager-dev:pr-5275

Note

Ensure you backup your NPM instance before testing this image! Especially if there are database changes.
This is a different docker image namespace than the official image.

Warning

Changes and additions to DNS Providers require verification by at least 2 members of the community!

@7heMech 7heMech mentioned this pull request Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Teamspeak 3 Port Stream high packet lose

2 participants