This article details integrating Netty with Spring Boot to build a scalable TCP long-connection gateway, covering binary protocol design with length-field framing, heartbeat detection using IdleStateHandler, session management with Redis and local maps, single-node and Redis Pub/Sub cluster push mechanisms, and performance tuning tips including Epoll transport and thread pool isolation.
This article details six essential Nginx configuration optimizations for high-concurrency scenarios, covering worker processes, connection limits, epoll event model, TCP reuse via sendfile and TCP options, HTTP keepalive, and upstream connection pooling with concrete examples and configuration snippets.
PHP 8.6 adds a native Io\Poll API that brings epoll/kqueue support into the engine, and a Symfony polyfill makes the same API usable on PHP 8.1‑8.5, enabling Workerman’s event loop to run without C extensions; benchmarks show up to double the throughput with zero code changes when upgrading.
The article explains how Nginx reverse proxy improves website performance by preventing backend threads from being blocked by slow clients, using an event‑driven epoll model, buffering, connection pooling, SSL termination, and proper configuration settings.
The article walks developers through the root causes of high CPU consumption when using select/poll, explains why epoll solves these bottlenecks, and provides a complete, pure‑C implementation that covers socket setup, epoll creation, registration, event loops, level‑trigger vs edge‑trigger modes, and performance comparisons.
An online gateway crashed despite low CPU and memory because its one‑connection‑one‑thread BIO model exhausted threads, prompting a deep dive into thread‑pool limits, epoll, Reactor patterns, Proactor, and back‑pressure, showing how each evolution decouples connections from resource consumption to achieve million‑QPS scalability.
Redis achieves its high speed not only because it is an in‑memory, single‑threaded database with efficient data structures, but primarily thanks to I/O multiplexing, which lets a single thread manage tens of thousands of client connections, dramatically cutting thread‑switch overhead and boosting throughput up to tenfold.
This article explains the concepts of synchronous vs. asynchronous and blocking vs. non‑blocking I/O, outlines the five Unix I/O models, and then compares select, poll, and epoll—including their internal mechanisms, performance trade‑offs, edge‑ and level‑triggered modes, and why epoll is considered the solution to the C10K problem.
Human researcher Jaeyoung Chung uncovered the Bad Epoll kernel race‑condition (CVE‑2026‑46242) that AI model Mythos missed, demonstrating that even the most advanced AI code‑auditing tools can overlook critical vulnerabilities while human intuition and deep analysis still dominate security research.
An interviewer's question about the difference between epoll and select reveals a tangled web of OS‑level IO mechanisms; this article unpacks user‑space vs kernel‑space, DMA, zero‑copy, buffering, and maps the five Java IO models (BIO, NIO, AIO, etc.) to their underlying system calls.
A benchmark on an 8‑core Linux 6.6 system shows that switching Netty from epoll to io_uring lets a half‑sized thread pool achieve 3 % higher throughput, more than double per‑thread efficiency, and a 67 % reduction in CPU migrations, challenging the traditional rule of using twice‑the‑core thread counts.
The article explains why Nginx can sustain tens of thousands of simultaneous connections by using non‑blocking sockets, an epoll‑driven event loop, a fixed pool of worker processes, shared memory and memory‑pool optimizations, contrasting this design with Apache's prefork model.
The article explains how Redis attains up to 500,000 queries per second on a single node by leveraging ultra‑fast in‑memory access, a single‑threaded core for data operations, and epoll‑based I/O multiplexing that eliminates per‑connection thread overhead.
The article explains how Nginx sustains one million simultaneous connections by using asynchronous non‑blocking I/O, a robust multi‑process architecture, zero‑copy file transmission, and optimized caching strategies, with concrete configuration examples and performance reasoning.
The article explains that the 65,535 TCP port limit applies only to client-side temporary ports, while server concurrency is constrained by memory, file descriptors, and CPU, and outlines practical optimization techniques such as load balancing, epoll, kernel tuning, and connection reuse to achieve million‑scale traffic.
This article explains how Redis achieves lightning‑fast performance with a single‑threaded architecture by leveraging in‑memory operations, IO multiplexing, and event‑driven design, and it details the four key advantages of this approach as well as the evolution introduced in Redis 6.0.
This article traces the evolution from select and poll to epoll and finally io_uring, explains how multishot accept and receive work, compares benchmark results, and provides practical guidance for migrating production servers from epoll‑based event loops to the newer io_uring model.
Learn how to maximize Nginx throughput by correctly configuring worker_processes, worker_connections, enabling epoll, and using accept_mutex, with practical examples, formulae, and system‑level tweaks to avoid common pitfalls like CPU oversubscription and 'too many open files' errors.
This article explains how Netty leverages Linux epoll, a reactor thread model, zero‑copy techniques, custom memory pools, and careful OS/JVM tuning to enable a single server to handle up to a million simultaneous connections efficiently.
This article explains the inner workings of Linux's epoll mechanism, detailing how red‑black trees manage registered file descriptors and how a ready‑list delivers events in O(1) time, covering core APIs, data structures, insertion‑deletion logic, and the full kernel‑space to user‑space flow.
This guide explains how to unleash Nginx's full potential on multi‑core Linux servers by configuring automatic CPU affinity, increasing worker connections with epoll, raising system file limits, and enabling zero‑copy transmission, resulting in up to ten‑fold throughput gains and dramatically lower CPU usage.
This article explains how Linux’s epoll mechanism, built on libevent and using red‑black trees and ready‑list queues, provides scalable I/O multiplexing for sockets, eventfd and timerfd while traditional file systems like ext4 cannot be managed directly, and outlines the key efficiency tricks behind its design.
The proposal introduces a unified poll API for PHP that replaces the limited stream_select() function with a flexible, platform‑aware interface supporting epoll, kqueue, WSAPoll and other backends, enabling high‑performance, scalable I/O handling for servers and event‑driven applications.
This article explains the concepts, advantages, limitations, and practical usage of Linux I/O multiplexing mechanisms—select, poll, and epoll—through analogies, detailed explanations, code examples, and common interview questions, helping developers choose the right tool for high‑concurrency network programming.
epoll, Linux’s high-performance I/O multiplexing mechanism, outperforms select and poll by leveraging a red-black tree to manage file descriptors, offering O(log n) registration, O(1) event retrieval, and scalable handling of millions of connections, with detailed explanations of its architecture, workflow, and performance advantages.
This article explains the limitations of traditional I/O models such as blocking I/O, non‑blocking I/O, select and poll, introduces epoll’s design, core data structures, operation modes, system‑call interface, and provides practical code examples and optimisation tips for high‑concurrency network servers.
The thundering herd problem in Linux causes multiple processes or threads to wake up simultaneously for a single event, leading to wasted CPU cycles, excessive context switches, lock contention, and severe performance degradation, but it can be mitigated with kernel tweaks, epoll flags, SO_REUSEPORT, thread pools, and other strategies.
This article explores Linux’s epoll interface in depth, covering its core architecture, LT and ET trigger modes, underlying red‑black tree and linked‑list data structures, callback workflow, practical code examples, and best‑practice guidelines for high‑concurrency network applications.
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.
This article explains how to achieve million‑level concurrent connections with Nginx by tuning OS limits, worker processes, epoll event handling, gzip compression, and zero‑copy file transfer, providing concrete configuration snippets and performance rationale for each optimization.
This article explains the limitations of traditional I/O models, introduces epoll as a high‑performance Linux I/O multiplexing mechanism, details its design principles, API usage, kernel data structures, and provides practical coding examples and optimization tips for building scalable backend services.
Linux treats all I/O devices as files, enabling a single thread to monitor many descriptors via I/O multiplexing; while select and poll use linear scans and suffer size limits, epoll employs an event‑driven red‑black tree with edge‑triggered mode, offering scalable, high‑performance handling for thousands of concurrent connections.
epoll is a high‑performance Linux I/O multiplexing mechanism that replaces select/poll by using an event‑driven design with a red‑black tree and ready list, supporting edge‑ and level‑triggered modes, efficient data transfer via mmap, and providing superior scalability for high‑concurrency network applications.
Socket provides a file‑descriptor based network communication abstraction in the OS, while epoll uses a red‑black‑tree and ready‑queue mechanism to deliver O(log N) scalable I/O event handling, together forming the core design that enables high‑concurrency servers to efficiently manage thousands of connections.
This article explains the fundamentals of I/O in Unix and Java, covering the distinction between user and kernel space, the five Unix I/O models, the evolution from select/poll to epoll/kqueue, and how modern network frameworks like Reactor and Proactor leverage these mechanisms for high‑performance networking.
This article explains how Redis achieves million‑level concurrent connections by using an event‑driven Reactor model, non‑blocking I/O, efficient I/O multiplexing such as epoll, and in‑memory data storage to deliver ultra‑low latency and high throughput.
This article explains how epoll improves Linux I/O multiplexing by using red‑black trees and ready lists, compares level‑triggered and edge‑triggered modes, details the epoll_create/epoll_ctl/epoll_wait system calls, discusses common pitfalls, and provides a complete TCP server example for handling many concurrent connections.
This article explains the distinction between user space and kernel space, describes blocking and non‑blocking I/O, and compares select, poll, and epoll multiplexing techniques, including signal‑driven and asynchronous I/O models with code examples.
This article explains the fundamentals of network I/O, covering hardware basics, process scheduling, blocking and non‑blocking models, multiplexed I/O techniques such as select/poll/epoll, asynchronous I/O, socket types, and the user‑kernel boundary, providing a comprehensive guide for backend developers.
This article explains Netty's powerful asynchronous architecture, compares classic multithread, Reactor, select, poll, and epoll I/O multiplexing models, demonstrates JNI integration for native performance, and provides complete example code for building a high‑performance epoll‑based server in Java.
This article explains the fundamentals of input/output (IO) in operating systems, covering the basic IO concept, the role of the OS, the two‑phase IO call process, and detailed descriptions of blocking, non‑blocking, multiplexed (select, poll, epoll), signal‑driven and asynchronous IO models with example code.
This article explains the fundamentals of input/output (IO) in operating systems, covering the basic IO concept, the role of the OS, the two-stage IO process, and various IO models such as blocking, non‑blocking, select/poll/epoll, signal‑driven and asynchronous approaches.
This article explains how epoll works as Linux's high‑performance I/O multiplexer, compares it with select and poll, details its three‑step workflow, data structures, code examples, and the trade‑offs between level‑triggered and edge‑triggered modes for building scalable network servers.
This article explains the principles, advantages, and implementation details of Linux's epoll I/O multiplexing mechanism, compares it with select and poll, describes its level‑ and edge‑triggered modes, and provides practical C and Python examples for building high‑concurrency network servers.
This article breaks down Nginx’s high‑concurrency architecture, covering the Master‑Worker process model, event‑driven non‑blocking I/O with epoll, asynchronous request handling, and performance‑boosting features like caching and Gzip compression.
This article explains how Nginx’s event‑driven, asynchronous non‑blocking architecture, combined with epoll/kqueue I/O multiplexing and cache optimization, enables it to serve millions of simultaneous connections with high concurrency, low latency, and high throughput.
This article explains how Nginx uses an event‑driven, asynchronous non‑blocking I/O model together with epoll/kqueue and various optimization strategies such as keep‑alive, caching, efficient data structures and load balancing to handle millions of concurrent connections in large‑scale internet architectures.
This article explains Netty’s asynchronous architecture, compares classic multithread, Reactor, select, poll and epoll models, clarifies level‑triggered versus edge‑triggered event handling, and provides step‑by‑step JNI and hand‑written epoll server examples in C to illustrate high‑performance backend development.
Redis primarily operates with a single thread using I/O multiplexing (select, poll, epoll) to handle massive concurrent connections, while newer versions introduce optional multi‑threaded networking and use child processes for persistence, maintaining its core single‑threaded design for data processing.
This article explains the concepts of level‑triggered (LT) and edge‑triggered (ET) event notification in Linux epoll, describes epoll's core data structures such as the red‑black tree and ready‑list, details the three main APIs (epoll_create, epoll_ctl, epoll_wait), and examines the locking and internal kernel mechanisms that enable efficient I/O multiplexing.
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.
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.
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.
This article systematically explains epoll's core data structures—including a red‑black tree and a doubly linked ready list—its three main APIs, the kernel implementation details, thread‑safety mechanisms, ET vs. LT behavior, and how it improves over select/poll for high‑concurrency network programming.
This article explains the separation of user and kernel space, compares blocking, non‑blocking, multiplexed, signal‑driven, and asynchronous I/O models, and details the select, poll, and epoll mechanisms used to efficiently handle multiple file descriptors in Linux.
This article explains why Redis achieves exceptional speed by leveraging in‑memory storage, an efficient hash‑table data structure, a single‑threaded event loop, epoll I/O multiplexing, incremental rehashing, and cached timestamps, providing a comprehensive view of its performance optimizations.
This article explains the concept of IO, the role of the operating system, the complete IO workflow, and compares five common IO models—blocking, non‑blocking, select/poll/epoll multiplexing, signal‑driven, and asynchronous—highlighting their mechanisms, advantages, and typical use cases.
This article explains Netty’s reactor‑based asynchronous architecture, compares classic multithread, select, poll and epoll I/O multiplexing models, demonstrates Java‑C interaction via JNI, and provides a complete hand‑written epoll server implementation with detailed code and performance insights.
This article systematically explains epoll’s internal data structures, how the protocol stack notifies it, the locking strategy for thread safety, the differences between edge‑triggered and level‑triggered modes, and why it outperforms select/poll in high‑concurrency Linux I/O.
Redis processes core command operations in a single thread but incorporates multithreaded components for asynchronous tasks and network I/O, using an event‑driven epoll model and optional I/O threads introduced in v6.0 to boost performance on multi‑core systems.
This article explains how asynchronous programming and event‑driven mechanisms work in both frontend JavaScript and backend Golang, covering the JavaScript event loop, macro‑ and micro‑tasks, goroutine‑based concurrency, and the kernel‑level epoll architecture that together enable efficient, non‑blocking execution.
This article explains Linux file concepts, how file descriptors work, why simple blocking I/O fails at scale, and introduces I/O multiplexing techniques—including select, poll, and epoll—detailing their mechanisms, limitations, and practical code examples for high‑concurrency servers.
This article explains how Redis uses Linux epoll and a single‑threaded event loop to handle millions of connections efficiently, covering the creation of the epoll object, server initialization, event registration, the main processing loop, and the mechanisms for reading, writing, and managing pending tasks.
This article explains the concept of coroutines as lightweight user‑level threads, compares them with traditional threads, details various implementation mechanisms in C/C++ (including libco and NtyCo), and demonstrates how they improve I/O‑bound server performance through examples and code snippets.
This article explains the historic C10K problem of handling ten thousand concurrent connections, compares traditional BIO with modern I/O models such as NIO, select, poll, epoll, and AIO, and provides Java and C++ code examples illustrating how each model improves scalability and performance.
This article explains the fundamentals of socket programming, detailing server and client setup steps, the TCP three‑way handshake, criteria for readable and writable sockets, and advanced techniques such as multi‑process models, I/O multiplexing, the Reactor pattern, and Epoll’s role in efficient event‑driven networking.
This article explains the advantages of epoll over select for I/O multiplexing in Linux, covering its event-driven design, edge-triggered vs level-triggered modes, core APIs, practical code examples, and performance considerations for high‑concurrency network servers.
This article explains the thundering herd effect, walks through Nginx's master‑worker architecture and its use of epoll, and compares three practical solutions—accept_mutex, EPOLLEXCLUSIVE, and SO_REUSEPORT—to eliminate wasted wake‑ups in high‑concurrency servers.
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.
This article explains the evolution of I/O multiplexing in Java, covering the birth of multiplexing, the introduction of NIO with Selector, and detailed comparisons of select, poll, and epoll mechanisms, including their APIs, internal workings, and performance considerations for high‑concurrency network programming.
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.
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.
This article explains how asynchronous programming and event‑driven mechanisms work in both frontend JavaScript environments and backend systems such as Go and Linux epoll, covering concepts like the event loop, macro‑ and micro‑tasks, goroutines, channels, and kernel interrupt handling.
This article explains the two‑stage socket I/O process in Linux, compares blocking, non‑blocking, and I/O multiplexing techniques, details the select, poll, and epoll APIs with their advantages and drawbacks, and provides complete C code examples for a high‑performance TCP server and client.
This article explains the five Linux I/O models—blocking, non‑blocking, I/O multiplexing, signal‑driven, and asynchronous—detailing their system calls, behavior, and performance characteristics while using vivid analogies to illustrate each model’s workflow.
This article explains Netty's high‑performance asynchronous architecture, compares classic multithread, Reactor, select, poll and epoll I/O multiplexing models, describes level‑triggered versus edge‑triggered event handling, and provides a step‑by‑step JNI example and a hand‑written epoll server implementation in C.
This article explains how Netty implements a powerful asynchronous, event‑driven architecture using the Reactor pattern, compares classic multithread, select, poll and epoll I/O multiplexing models, demonstrates JNI integration with Java, and provides a complete, annotated epoll server example with level‑triggered and edge‑triggered handling for high‑concurrency backend development.
This article explains Netty’s reactor‑based asynchronous architecture, compares classic multithread, select, poll and epoll models, demonstrates JNI integration with C code, and provides a complete hand‑written epoll server example to illustrate high‑performance backend networking in Java.
This article explains Netty’s high‑performance asynchronous architecture, the evolution of I/O multiplexing models from select to poll and epoll, demonstrates Java‑C integration via JNI with detailed code examples, and provides a complete hand‑written epoll server in C for achieving million‑connection concurrency.
This article provides an in‑depth explanation of Linux I/O multiplexing models—including select, poll, and epoll—detailing their mechanisms, advantages, limitations, and practical C code examples, while also covering edge‑triggered vs level‑triggered behavior and offering a complete epoll server implementation.
This article explains common concurrency models, thread‑pool and coroutine techniques, and various Linux I/O models—including blocking, non‑blocking, multiplexing, and asynchronous I/O—highlighting their trade‑offs and practical usage in high‑performance backend systems.
This article explains the concepts of synchronous and asynchronous execution, blocking and non‑blocking operations, user and kernel space, process switching, file descriptors, cache I/O, and compares various Linux I/O models such as blocking, non‑blocking, multiplexing, signal‑driven and asynchronous I/O, including the differences among select, poll and epoll.
This article explains the epoll interface, its underlying data structures, the three-step usage pattern, the differences between level‑triggered and edge‑triggered modes, the reactor model, and provides a complete C demo, helping developers efficiently handle millions of concurrent TCP connections on Linux.
This article explains Nginx's network design, showing how the master process only creates and binds listening sockets while worker processes each create an epoll instance, register events, and handle accept, read, and write operations, illustrating the complete flow from code snippets to multi‑process coordination.
This article explains why traditional select and poll struggle with many file descriptors, how epoll redesigns the workflow by registering descriptors once via epoll_ctl, the kernel data structures (eventpoll, epitem) that manage events, and walks through the core functions epoll_create, epoll_ctl, epoll_wait, and their callbacks.
This article explains how Redis uses Linux epoll and a single‑threaded event‑driven architecture to handle tens of thousands of connections efficiently, detailing the initialization of the server, the event‑loop mechanics, and the processing of client commands from accept to reply.
This article explains how epoll solves the inefficiencies of select/poll by using a kernel‑side red‑black tree and ready‑list, details its API, internal structures, trigger modes, reactor model, and provides a complete C demo for building a scalable TCP server.
This article provides a comprehensive source-level analysis of Redis 6.0 and later multi-threaded architecture, detailing how the main event loop coordinates with dedicated I/O threads to efficiently distribute, parse, and process concurrent read and write requests while maintaining high throughput and low latency.
This article explains Nginx's network design, detailing how the master process only creates and binds listening sockets while multiple worker processes each create their own epoll instance, register events, and handle client connections through accept, connection initialization, and event‑driven I/O.
This article explains why traditional select/poll struggle with massive connections, how epoll's event-driven design using a red‑black tree and ready‑list dramatically improves scalability, details its two trigger modes, and provides a complete C demo illustrating a high‑performance reactor model.
This article explains how Nginx separates network responsibilities between its master and worker processes, detailing the creation of listening sockets, the use of epoll for event‑driven I/O, the initialization of modules, and the handling of client connections in a multi‑process environment.
This article explains Nginx's multi‑process design, detailing how the master process handles socket binding and listening while each worker creates its own epoll instance, registers events, and processes connections through a well‑structured event loop with code examples from the source tree.
This article explains how Go's net package implements network operations—showing a simple server example, then dissecting the internal workflow of Listen, Accept, Read and Write, including socket creation, epoll integration, coroutine blocking and wake‑up mechanisms.
The article dissects Linux’s epoll I/O multiplexing, tracing the flow from socket creation with accept through epoll_create, epoll_ctl registration, and epoll_wait sleeping, detailing the kernel’s eventpoll object, red‑black tree, per‑socket wait‑queue callbacks that enable O(log N) registration and O(1) event delivery for tens of thousands of connections.
The article dissects netpoll, a Go‑based high‑performance network framework that uses a Multi‑Reactor model with a main and sub‑reactors, detailing its server EventLoop, poll manager load‑balancing across epoll/kqueue, connection buffering and request handling, and the client’s non‑blocking dialing process.
This article dissects Go's net package, showing how its Listen, Accept, Read and Write functions combine goroutines with epoll to deliver synchronous‑style code that avoids costly thread switches, and walks through the underlying source code and runtime mechanisms step by step.
In this interview‑style tutorial, an Alibaba P7 engineer walks through the limitations of BIO, the non‑blocking NIO API, kernel‑level select/poll mechanisms, and the design of epoll, illustrating how each solves the C10K problem and how they are used in Java.
EventHub acts as the bridge between Linux input devices and Android’s InputReader by monitoring /dev/input with inotify and epoll, detecting device additions, opening and registering new devices, reading raw input_event structures, converting them into RawEvent objects, and handling closures, rescans, and wake‑up signals in a continuous loop.
This article explains how to use Python's socket module together with I/O multiplexing techniques such as select, poll, epoll, and the high‑level selectors module to build non‑blocking, scalable network servers that can handle multiple client connections concurrently.
This article explains core Linux I/O concepts—including synchronous vs. asynchronous operations, blocking vs. non‑blocking behavior, user and kernel space separation, process switching, file descriptors, cache I/O, and the differences among select, poll, and epoll—providing a comprehensive overview for developers.