epoll
The Linux kernel facility that lets one thread watch many file descriptors and be told which are ready for reading or writing.
In more detail
libuv uses epoll on Linux during the poll phase of the event loop. It scales to tens of thousands of connections because the kernel only reports descriptors that are ready.
Related terms
- kqueue — The event notification facility on macOS and BSD systems, doing the job epoll does on Linux and also reporting file changes.
- I/O completion ports — The Windows mechanism for high-performance asynchronous I/O, which libuv uses on Windows instead of epoll or kqueue.
- event demultiplexer — The part of libuv that waits on many sockets and files at once and reports which of them are ready, using facilities such as epoll.
- file descriptor — A small number the operating system gives a process for each open file, socket or pipe, used in every later read or write.
Taught in
- libuv Architecture: Event Demultiplexer & Thread Pool — Node.js Internals & Backend Services
- Poll & Check Phases: I/O Callbacks & setImmediate — Node.js Internals & Backend Services