Skip to content

Node.js Event Loop and Async I/O

Node.js is designed around asynchronous I/O. Instead of blocking a thread while waiting for network or file operations to finish, Node.js schedules the work and continues handling other events.

This model lets a single process handle many concurrent connections efficiently when most work is I/O-bound.

  • the event loop coordinates when queued work runs
  • callbacks and promises represent work that completes later
  • CPU-heavy work can still block the event loop

Use Node.js when your application does a lot of waiting on databases, APIs, queues, or files. Be careful with CPU-intensive logic inside request handlers.