juniorNode.js

Junior Question 1: What is Node.js and why is it single-threaded?

Updated May 4, 2026

Short answer

Node.js is a JavaScript runtime built on Chrome's V8 engine. It uses a single-threaded event loop for non-blocking I/O.

Deep explanation

While the JavaScript execution is single-threaded, Node uses libuv to handle system tasks in the background using a thread pool. This allows Node to handle thousands of concurrent connections without the overhead of thread context switching.

Real-world example

Building a real-time chat app where many users connect simultaneously.

Common mistakes

  • Thinking Node is completely single-threaded (it isn't
  • libuv uses a thread pool for disk/crypto).

Follow-up questions

  • What is libuv?

More Node.js interview questions

View all →