Skip to main content
🟒

Node.js

JavaScript on the server. Non-blocking I/O, the event loop, and streams are the foundations to understand deeply.

Topics

β—† Core Model
Node.js is single-threaded for JavaScript execution but uses libuv’s thread pool for I/O operations (file system, DNS, crypto). This is why it’s non-blocking without needing multiple threads.
πŸ’‘ Interview Tip
The Node.js event loop has more phases than the browser event loop (timers β†’ I/O β†’ poll β†’ check β†’ close). Know the difference, especially setImmediate vs setTimeout(fn, 0).