Node.js interviews revolve around the event loop, asynchronous patterns, Express or NestJS, and the consequences of a single-threaded runtime. Below are the most common questions with model answers. Senior: architecture, trade-offs, mentoring, and decision-making.
Try it — no account needed
Preparing your question…
Topics to prepare
✓Event loop and its phases
✓Promises and async/await
✓Streams and buffers
✓Express / NestJS
✓Middleware and error handling
✓JWT and authentication
6 Senior-level questions with answers
1
How do you scale a Node service that is running out of headroom?
Answer
Establish what the limit is before adding machines: event loop saturation, connection pool exhaustion and downstream latency all look like slowness and have different fixes. Horizontal scaling helps only when the process is genuinely the bottleneck. The change with the largest payoff is usually moving synchronous work out of the request path, not adding instances.
2
What does backpressure mean and where does it bite in practice?
Answer
It is the signal that a consumer cannot keep up, and honouring it means slowing the producer instead of buffering. It bites wherever data arrives faster than it can be written — an upload to slow storage, a queue consumer that acknowledges before processing, a stream piped into a slow database. Ignored, the buffer is memory, and the failure is an out-of-memory kill rather than a graceful slowdown.
3
How do you deploy without dropping in-flight requests?
Answer
The process must stop accepting new connections, finish what it is holding, close database pools, and only then exit — which means handling SIGTERM rather than letting the default kill it. It also needs a readiness probe distinct from liveness, so the load balancer removes the instance before shutdown starts. Without both, every deploy produces a burst of errors nobody attributes to the deploy.
4
Monolith or services for a Node backend — how do you decide?
Answer
By team boundaries and deployment independence, not by code size. Services pay off when separate teams need to ship without coordinating; before that they buy you distributed transactions, network failures between functions that used to be local, and a tracing problem. Node makes starting a service cheap, which is precisely why teams end up with twelve of them and no way to change anything.
5
What do you log, and what makes logs useful at three in the morning?
Answer
Structured JSON with a request id that follows the call through every service, so one identifier reconstructs the whole story. Log decisions and boundaries — what was received, what was chosen, what was returned — not the middle of loops. The volume question decides itself once you ask what you would search for during an incident; everything else is cost.
6
How do you keep a dependency tree safe over years?
Answer
Lockfile committed, automated audit in CI, and a policy on what gets added at all — a package with one maintainer and no releases in two years is a liability regardless of its download count. Update on a schedule so the jump is never large, because the alternative is a security fix that requires crossing three major versions. The Node ecosystem's depth is its convenience and its risk.
🦎
Reading answers is not enough
In a real interview you speak under pressure. Cam asks these same questions, scores every answer, and shows exactly what to fix.