The event loop, in Node terms
- Node's loop has phases - timers, pending callbacks, poll, check, close. `setImmediate` runs in check, `setTimeout(fn,0)` in timers, and the ordering between them is the classic puzzle.
- `process.nextTick` jumps ahead of promise microtasks, and starving the loop with it is a real failure mode.
- What blocks the loop: synchronous file reads, JSON parsing of large payloads, bcrypt with a high cost factor, tight CPU loops.
- What do you do about CPU-bound work? Worker threads, a separate service, or a queue - not threads in the usual sense.
Streams and backpressure
A reliable differentiator, because people who have moved large files know it and people who have not do not.
- Why stream a large file rather than read it into memory?
- What is backpressure, and what does `pipe` do about it for you?
- Readable, writable, duplex and transform - and writing a simple transform stream.
- What happens if a stream errors mid-pipeline, and why `pipeline()` is preferred over chained `pipe` calls.
Scaling and production
- Node is single-threaded for your code - so how do you use a multi-core machine? Cluster module, or a process manager, or container replicas.
- How do you handle an uncaught exception, and why is continuing to serve traffic after one risky?
- How would you find a memory leak? Heap snapshots and comparing them, not guessing.
- What is the role of a reverse proxy in front of Node?
- Graceful shutdown - stop accepting connections, drain in-flight requests, then exit.
Express and API questions
Middleware ordering and why it matters, how error-handling middleware differs in signature, validating input at the boundary, and where authentication belongs. Security questions overlap with security engineer interview questions - injection, secrets handling and rate limiting come up for backend roles too.
How deep it goes by level
- Junior: the fundamentals above, explained clearly. Nobody expects production scars yet, and honesty about what you have not done reads better than bluffing.
- Mid-level: the same ground, plus an API you have run in production. Expect follow-ups asking why you made a particular choice rather than whether you know the syntax.
- Senior: an incident you were paged for, and what you changed afterwards. At this level the language questions get shorter and the judgement questions get longer.
Whatever the level, the reliable way to prepare is to say your answers out loud rather than reading them. Most of what candidates lose in a Node.js interview is lost in the gap between knowing something and explaining it under observation - the method is in how to use AI for interview prep.
Where CoPilot Interview fits
Disclosure: we build an interview assistant, so treat this as a disclosed pitch. CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds, with a permanent free tier that needs no credit card.
Frequently asked questions
What are the most common Node.js interview questions?
The event loop phases and the ordering of `setTimeout`, `setImmediate` and `process.nextTick`; streams and backpressure; how to use multiple cores given Node's single-threaded execution; and what you check when a service is slow under load.
What blocks the Node.js event loop?
Synchronous file operations, parsing very large JSON payloads, expensive CPU work in a tight loop, and synchronous cryptographic work such as bcrypt with a high cost factor. The fix is worker threads, a separate service, or moving the work to a queue.
What is backpressure in Node streams?
The mechanism that stops a fast producer overwhelming a slow consumer - the writable side signals it cannot accept more, and the readable side pauses. Using `pipe` or `pipeline` handles this for you, which is the main reason to prefer them over manual data handling.
How does Node use multiple CPU cores?
Your JavaScript runs on one thread, so you scale with processes rather than threads: the cluster module, a process manager, or multiple container replicas behind a load balancer. Worker threads exist for CPU-bound work inside a process.
Walk into the round with a second pair of eyes
CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds. The free tier is permanent: 15 minutes a day, no credit card.
Try it free