[PR #5275] Add reuseport to improve performance and reduce packet drops #4140

Open
opened 2026-02-26 08:33:16 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/5275
Author: @7heMech
Created: 2/4/2026
Status: 🔄 Open

Base: developHead: develop


📝 Commits (1)

  • e72dfc3 Add reuseport to improve performance and reduce packet drops

📊 Changes

1 file changed (+4 additions, -4 deletions)

View changed files

📝 backend/templates/stream.conf (+4 -4)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NginxProxyManager/nginx-proxy-manager/pull/5275 **Author:** [@7heMech](https://github.com/7heMech) **Created:** 2/4/2026 **Status:** 🔄 Open **Base:** `develop` ← **Head:** `develop` --- ### 📝 Commits (1) - [`e72dfc3`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/e72dfc3bfd0a0abc06beb8e216f4f49f427621c0) Add reuseport to improve performance and reduce packet drops ### 📊 Changes **1 file changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `backend/templates/stream.conf` (+4 -4) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#4140
No description provided.