Node’s single-threaded, async model is where most weak candidates fall down. These questions surface whether someone actually understands the event loop and how to scale a service — not just the Express syntax.
Hiring a Node.js developer is easy. Telling a real one from a convincing résumé is the hard part — and it’s most of what we do. These are grouped by level, because the same question that stretches a junior is a warm-up for a senior.
Junior Node.js interview questions
0–2 years
Does the event loop and async model actually click for them?
How does Node.js handle concurrency if it’s single-threaded?
A single-threaded event loop delegates I/O to libuv’s thread pool and the OS, so Node stays non-blocking and handles many connections at once; CPU-bound work still blocks the loop. A good answer distinguishes I/O concurrency from CPU parallelism.
Believes Node is multi-threaded by default, or that async makes CPU-heavy work run in parallel.
What’s the difference between CommonJS require and ES module import?
CommonJS loads synchronously with module.exports; ES modules are statically analysable, load asynchronously and tree-shake. A strong candidate mentions "type":"module" and the interop caveats between them.
Unaware there’s any difference, or that mixing the two causes real errors.
What is the difference between dependencies and devDependencies?
Runtime deps vs build/test-only deps; the lockfile pins exact versions for reproducible installs; semver ranges control updates. Bonus for mentioning why shipping devDeps to prod bloats images.
Puts everything in dependencies or doesn’t know the lockfile exists.
Mid-level Node.js interview questions
2–5 years
Can they write async code that doesn’t swallow errors or block the loop?
How do you handle errors across callbacks, promises and async/await?
try/catch around awaited calls, .catch() on promises, never swallow errors, centralised error-handling middleware, and a handler for unhandledRejection. They propagate context rather than logging and continuing.
Empty catch blocks, no global handler, or unhandled floating promises.
How do you avoid blocking the event loop?
Move CPU-heavy work to worker_threads, child processes or a job queue; stream large payloads instead of buffering; avoid synchronous fs/crypto calls in the request path. They know how to spot a blocked loop.
Runs heavy loops, large JSON parsing or sync file reads inside a request handler.
How do you manage configuration and secrets across environments?
Environment variables, a local-only .env that is never committed, a secrets manager in production, and validating required config at boot so the app fails fast.
Hardcodes secrets or commits .env files.
Senior Node.js interview questions
5+ years
Scaling, streaming and diagnosing production failures.
How do you scale a Node service across CPU cores and instances?
Because a process is single-threaded, run multiple processes (cluster/PM2) or multiple stateless containers behind a load balancer, and externalise session/state to Redis or the database. Horizontal scaling, not one fat process.
Keeps state in-process, or expects one process to saturate all cores for I/O work.
How do you handle backpressure when streaming large data?
Use Node streams and pipe/async iterators, respect highWaterMark, and never buffer an entire file or response in memory. They can explain what happens when a consumer is slower than the producer.
Reads whole files/responses into memory with readFileSync or by concatenating chunks.
How would you debug a memory leak in a production Node service?
Capture heap snapshots (--inspect, clinic, heapdump), watch RSS over time, and diff snapshots to find retained closures, unbounded caches or leaked event listeners. Diagnosis before mitigation.
Treats periodic process restarts as the fix without ever finding the cause.
Browse the full series on the interview questions hub, or see how we assess engineers in our interview process.