In Node.js, which phase of the event loop processes I/O callbacks?

The story behind the answer

In Node.js, the poll phase processes I/O callbacks. It retrieves events from the operating system or the libuv event mechanism, then invokes the JavaScript callbacks associated with completed I/O operations such as network activity or certain filesystem work.

The event loop is divided into phases so Node.js can organize different kinds of asynchronous work. The timers phase handles eligible timer callbacks, the pending-callbacks phase handles selected deferred system callbacks, the check phase runs `setImmediate()` callbacks, and the close-callbacks phase handles events such as socket closures.

The poll phase is also where Node.js may wait for new I/O events when there is no other immediately runnable work. Its exact scheduling behavior can depend on the presence of timers, queued callbacks, and the Node.js version, so the phases should not be treated as completely isolated queues.

A frequent mix-up is choosing the check phase because `setImmediate()` often runs after an I/O callback. The I/O callback itself belongs to the poll phase; a `setImmediate()` callback scheduled from it is handled later in the check phase.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: