How Nginx Rewrite Blocks IE and the Five Core Server I/O Models Explained
This article explains how to use Nginx rewrite rules to block Internet Explorer and provides a detailed overview of four theoretical I/O models and five practical I/O models used in network services, illustrated with diagrams and a discussion of libevent implementation.
nginx rewrite to block IE browsers
1. Four theoretical I/O models
Caller (service process): Blocking – the process is suspended until I/O completes; Non‑blocking – the process can continue other work while I/O is pending.
Called function (system I/O read/write): Synchronous – the function does not return until the operation finishes; Asynchronous – the function returns immediately with an unfinished status and notifies the caller upon completion.
Four theoretical models:
Synchronous blocking
Synchronous non‑blocking (rarely used)
Asynchronous blocking
Asynchronous non‑blocking: true asynchronous I/O
2. Five I/O models in network services
1) Synchronous blocking model
Worker process calls an I/O library function and is blocked until the first stage (data loaded from disk to kernel space) finishes; then it remains blocked while the kernel copies data to user space.
2) I/O multiplexing (synchronous blocking model)
Uses select() or poll() to manage multiple I/O requests; the worker blocks on the multiplexing call but can handle many descriptors simultaneously, improving efficiency. The second stage still requires copying data to user space and remains blocked.
3) Synchronous non‑blocking (busy‑wait model)
Worker calls an I/O function, can do other work while periodically checking if I/O is complete; the second stage still involves copying data to user space and blocks.
4) Event‑driven model (synchronous non‑blocking)
Worker calls an I/O function and does not wait; the kernel notifies the process via events (e.g., epoll(), kqueue()) when I/O completes. The second stage still blocks during data copy.
5) Fully asynchronous (AIO)
Full async 1: Worker calls an I/O function, does not wait; kernel notifies completion, and the library copies data to user space without worker involvement.
Full async 2: Similar, but data is transferred via memory mapping (mmap) instead of copying.
Implementation can use the libevent library.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
