Operating systems · interactive
Blocking I/O vs epoll
A server has five open connections. Each client sends its request at a different moment. How quickly each gets served depends on how the server waits for data.
- conn 12 ms
- conn 254 ms
- conn 346 ms
- conn 42 ms
- conn 554 ms
Line: request arrives. Bar: time until the server handles it.
1 thread · ~8 MB of stacks
The thread blocks reading connection 1, which sends nothing until 60 ms. Connections 2, 3 and 5 sit waiting with data ready: up to 54 ms.
Server model
Step 1 of 4 · read left to right
In production
Tools and technologies
Every high-concurrency server waits on sockets this way.
Not tied to one language — use these names when you search docs or design a system.