Tagged articles
SO_REUSEPORT
16 articles · Page 1 of 1
This article explains the thundering herd issue in Nginx’s multi‑process model, detailing both accept‑ and epoll‑related herd problems, their causes, and practical mitigation techniques such as kernel‑level improvements, Nginx’s accept_mutex, dynamic load balancing, and the SO_REUSEPORT feature.
EpollSO_REUSEPORTaccept_mutex
0 likes · 11 min read

This article breaks down the interview question "Can TCP and UDP use the same port?" by examining protocol-level port spaces, client‑side TCP and UDP port sharing rules, server‑side TCP reuse with SO_REUSEADDR, and UDP reuse with SO_REUSEPORT, complete with code examples and practical implications.
Port SharingSO_REUSEADDRSO_REUSEPORT
0 likes · 17 min read

This article explains the thundering herd phenomenon in multi‑process servers, describes Nginx's master‑worker architecture and its use of epoll, and evaluates three mitigation techniques—accept_mutex, EPOLLEXCLUSIVE, and SO_REUSEPORT—along with relevant source code examples.
EpollSO_REUSEPORTaccept_mutex
0 likes · 9 min read

This article explains the thundering herd phenomenon in multi‑process/thread servers, details its performance costs, demonstrates the issue with accept() and epoll_wait() through C examples, explores thread‑level herd, and presents mitigation techniques such as accept mutexes, SO_REUSEPORT, and Nginx's handling.
ConcurrencyEpollLinux kernel
0 likes · 20 min read

This article explains the Linux thundering herd phenomenon, its impact on processes, threads, and epoll, demonstrates it with C code examples, analyzes system overhead, and presents mitigation techniques such as accept mutex, SO_REUSEPORT, and proper locking to improve server performance.
EpollLinuxSO_REUSEPORT
0 likes · 19 min read

Learn how to make multiple Docker containers share a single external port by using reverse‑proxy load balancing with Nginx, configuring DNAT iptables rules, and leveraging the SO_REUSEPORT socket option, complete with step‑by‑step commands and network setup examples.
DNATSO_REUSEPORTload-balancing
0 likes · 8 min read

This article explains the thundering herd phenomenon in multi‑process servers, walks through Nginx’s master‑worker architecture and its use of epoll, and compares three practical mitigation techniques—accept_mutex, EPOLLEXCLUSIVE, and SO_REUSEPORT—complete with code excerpts and configuration examples.
BackendConcurrencyEpoll
0 likes · 9 min read

This article explains the thundering herd phenomenon in multi‑process servers, examines Nginx’s master‑worker architecture, and details three mitigation techniques—accept_mutex, EPOLLEXCLUSIVE, and SO_REUSEPORT—showing how each leverages epoll and kernel features to reduce unnecessary wake‑ups.
EpollSO_REUSEPORTaccept_mutex
0 likes · 9 min read

This article explains the thundering herd effect in multi‑process servers, describes Nginx's master‑worker architecture and its use of epoll, then compares three mitigation techniques—accept_mutex, EPOLLEXCLUSIVE, and SO_REUSEPORT—showing code snippets and performance insights.
EpollSO_REUSEPORTaccept_mutex
0 likes · 9 min read

Linux kernels 3.9+ introduce the SO_REUSEPORT option, allowing multiple processes to bind and listen on the same port, with the kernel handling load‑balancing and security checks; this article explains the problem it solves, the underlying implementation, and provides practical C examples and verification steps.
C++SO_REUSEPORTload-balancing
0 likes · 16 min read


ITPUBFeb 21, 2022 · Backend Development
This article explains why Linux kernels 3.9+ allow multiple processes to bind the same port, how the REUSEPORT option implements kernel‑level load balancing, and provides step‑by‑step examples showing configuration, code snippets, and performance verification.
BackendLinuxSO_REUSEPORT
0 likes · 14 min read

This article explains the Linux SO_REUSEPORT feature introduced in kernel 3.9, how it allows multiple processes to bind and listen on the same port, the kernel's load‑balancing mechanism, and provides practical C examples and verification steps for developers.
LinuxSO_REUSEPORTSocket
0 likes · 15 min read

This article walks through Linux process states, fork/exec creation, CPU vs load metrics, network I/O models, and a real‑world Nginx high‑load case, showing how strace, accept_mutex, and SO_REUSEPORT can resolve the issue.
CPU utilizationEpollSO_REUSEPORT
0 likes · 12 min read

This article explains the differences and interactions between the SO_REUSEADDR and SO_REUSEPORT socket options, shows how they behave on BSD and Linux kernels across versions, and provides code examples and tables to illustrate binding rules, TIME_WAIT handling, and the evolution of reuse‑port support.
Linux kernelSO_REUSEADDRSO_REUSEPORT
0 likes · 14 min read

NGINX 1.9.1 introduces the SO_REUSEPORT socket option, allowing multiple workers to share the same IP and port, reducing lock contention and improving throughput, with detailed configuration steps and benchmark data demonstrating up to three‑fold request rate gains.
Backend PerformanceSO_REUSEPORTaccept_mutex
0 likes · 7 min read


21CTOMar 5, 2016 · Backend Development
NGINX 1.9.1 adds the SO_REUSEPORT socket option, allowing multiple workers to share the same IP and port, which the kernel load‑balances, reducing lock contention and dramatically improving request throughput and latency in multi‑core environments.
Performance TuningSO_REUSEPORTload-balancing
0 likes · 6 min read
