Skip to main content
1:1 mock interviews with Sumit, scored on a real hiring rubric.Book a slot →

6 topics · 0/6 read

Node.js Internals

How Node.js really works: V8 and libuv, the event loop phases, non-blocking I/O, streams and buffers, worker threads and cluster, modules and error handling.

  1. Node.js Architecture: V8, libuv and Non-Blocking I/O

    Node.js runs JavaScript on one main thread, yet one process can serve thousands of connections. The reason is its architecture: the V8 engine runs your code, and libuv hands slow I/O to the operating system and a small t

    Read now
  2. The Node.js Event Loop Phases

    The Node.js event loop runs in phases: timers, pending callbacks, poll, check and close. Between callbacks it drains process.nextTick and the promise microtask queue. Output-order questions about setTimeout, setImmediate

    Read now
  3. Streams and Buffers

    Streams let Node.js process data piece by piece instead of loading it all into memory. Buffers hold raw binary data. Interviewers ask about them to see if you can handle large files, uploads and responses without running

    Read now
  4. Worker Threads, Cluster and Child Processes

    Node.js gives you three ways to use more CPU: cluster runs several copies of your server, worker_threads run CPU-heavy JavaScript on other threads, and child_process runs other programs. Knowing which to use is a common

    Read now
  5. Modules: CommonJS vs ES Modules

    Node.js supports two module systems: CommonJS (require, module.exports) and ES modules (import, export). Interviewers ask how they differ in loading, caching and interop, because mixing them causes real errors.

    Read now
  6. Error Handling and Graceful Shutdown in Node.js

    Error handling in Node.js decides whether your server returns a clean 500 or crashes for everyone. Interviewers ask about async errors, unhandled rejections, operational versus programmer errors, and how to shut down wit

    Read now