Binding Sockets to Multiple Network Namespaces in Go Without Thread Overhead
The Namespace Binding Challenge
When proxying traffic across multiple network namespaces, a common misconception is that each namespace requires a dedicated OS thread. This implies calling setns(2) on a new thread for every namespace, resulting in a 1:1 ratio between namespaces and threads. This approach consumes excessive system resources and ...
Posted on Thu, 11 Jun 2026 17:53:23 +0000 by sivarts
Implementing UDP Broadcasting in C with epoll
UDP Broadcasting Implementation in C
The follownig example demonstraets how to create a UDP broadcast cliant in C using epoll for efficient I/O multiplexing. This client broadcasts messages to a specified network address and port, then listens for server responses.
Code Implementation
#include <sys/socket.h>
#include <netinet/in.h> ...
Posted on Mon, 01 Jun 2026 16:58:26 +0000 by morph07
Optimization Strategies and I/O Models for Apache and Nginx Web Servers
Understending I/O Models
In high-performance networking, the interaction between the application (A) and the system kernel (B) is defined by two primary dimensions: Synchronicity and Blocking behavior.
1. Synchronous vs. Asynchronous
Synchronous: The requesting program must actively query the status of a task. It remains responsible for checki ...
Posted on Sun, 17 May 2026 01:14:28 +0000 by slava_php
Linux Kernel Implementation of epoll
The epoll(2) mechanism in the Linux kernel provides an efficeint I/O event notification system. This analysis is based on kernel version 5.0.18 and explores its internal structures, system calls, and handling of ready events.
Core Data Structures
The primary data structure representing an epoll instance is struct eventpoll:
struct eventpoll {
...
Posted on Wed, 13 May 2026 21:03:41 +0000 by JackOfBlades
Deep Dive into Linux Epoll and I/O Multiplexing
I/O multiplexing is essential for handling high concurrency. Before Linux 2.6, select and poll were the primary mechanisms, but they struggle with massive connection counts. epoll resolves these limitations through an optimized architecture.Limitations of Select and PollWhen managing hundreds of thousands of connections where only a small fract ...
Posted on Thu, 07 May 2026 19:47:23 +0000 by fearfx