All skill tracks
backend field guide
Node.js
Node.js concurrency, async patterns, streams, and API design for backend interviews.
4 difficulty sections16 modules4 lessons4675 min
16
Modules
4/128
Lessons written
4675 min
Total read time
4
Difficulty sections
Cheat sheet: Node.js at a glance

128 of 4 lessons
- 1What is Node.js actually made of, and which parts are V8, libuv, and the standard library?Basicconceptual35 minIn writing
- 2How does V8 execute your JavaScript, and what is its garbage collector doing while your server serves traffic?Basicconceptual40 minIn writing
- 3Which globals does Node give you that the browser does not, and what is the process object actually for?Basicconceptual35 minIn writing
- 4How do you pick and pin a Node version for a project, and which runtime flags are worth knowing?Basicpractical30 minIn writing
- 5What makes an operation blocking in Node, and how do you spot a blocking call during a code review?Basicconceptual40 minIn writing
- 6How would you explain the difference between Node, the browser runtime, and newer runtimes like Deno or Bun to a team choosing one?Intermediateconceptual35 minIn writing
- 7An interviewer asks why a company should run its API on Node.js at all. How do you answer without hand-waving about speed?Scenarioscenario25 minIn writing
- 8Check your understanding of the Node runtime, V8, and blocking versus non-blocking work.Basicconceptual15 minIn writing
- 9How does require() resolve a specifier, and what does the module cache do to the singletons you export?Basicconceptual40 minIn writing
- 10What actually changes when a file is loaded as ESM instead of CommonJS?Intermediateconceptual45 minIn writing
- 11Which package.json fields decide how your code is loaded, and how do type, main, and exports interact?Intermediatepractical40 minIn writing
- 12How do you ship a library that works for both require() and import consumers without shipping two subtly different copies?Advancedpractical45 minIn writing
- 13What does a lockfile actually guarantee, and how do you decide when to upgrade a dependency?Intermediatepractical35 minIn writing
- 14How do workspaces change dependency resolution, and what tends to break first in a monorepo?Advancedpractical40 minIn writing
- 15A build fails with 'require() of an ES Module is not supported'. Walk an interviewer through your diagnosis and the fixes you would consider.Scenarioscenario30 minIn writing
- 16Check your understanding of module resolution, ESM/CJS interop, and package metadata.Basicconceptual15 minIn writing
- 17How does Node.js handle concurrency with a single JavaScript thread?Basicconceptual5 min
- 18Walk through the phases of a libuv event loop tick and name what runs in each one.Intermediateconceptual50 minIn writing
- 19Predict the output order of setTimeout, setImmediate, process.nextTick, and a resolved promise, and explain why that order holds.Intermediateconceptual45 minIn writing
- 20Why does setTimeout(fn, 100) rarely fire at exactly 100ms, and when does that inaccuracy actually matter?Intermediatepractical35 minIn writing
- 21When should you reach for setImmediate, and why is process.nextTick starvation a real production bug?Advancedconceptual40 minIn writing
- 22Which operations use the libuv thread pool, and what does raising UV_THREADPOOL_SIZE actually change?Advancedpractical45 minIn writing
- 23Explain the event loop to an interviewer well enough that they believe you have actually debugged one.Scenarioscenario30 minIn writing
- 24Check your understanding of loop phases, timer ordering, and microtask scheduling.Basicconceptual15 minIn writing
- 25Compare callbacks, Promises, and async/await for handling asynchronous work in Node.js, and when each is still the right tool.Intermediatepractical5 min
- 26What is the error-first callback convention, and what goes wrong when a callback is invoked twice?Basicconceptual35 minIn writing
- 27When do you reach for Promise.all, allSettled, race, or any, and what does each one do with errors?Intermediatepractical40 minIn writing
- 28How do you wrap a callback-based API in a promise without leaking an unhandled rejection?Intermediatepractical35 minIn writing
- 29How do you run ten thousand async tasks without opening ten thousand sockets at once?Advancedpractical45 minIn writing
- 30What problem do async iterators and for await...of solve that Promise.all does not?Advancedpractical45 minIn writing
- 31You inherit a service that mixes callbacks, promises, and async/await. How do you argue for a migration order?Scenarioscenario30 minIn writing
- 32Check your understanding of async control flow, combinators, and concurrency limits.Basicconceptual15 minIn writing
- 33How do you build an error a caller can actually act on, and what are custom error classes and Error.cause for?Basicconceptual35 minIn writing
- 34Why does try/catch fail to catch an error thrown inside a callback, and what catches it instead?Intermediateconceptual40 minIn writing
- 35What happens to an unhandled promise rejection in modern Node, and how should a long-running service react to one?Intermediatepractical40 minIn writing
- 36How do you decide whether to retry an error, surface it to the client, or let the process crash?Advancedconceptual40 minIn writing
- 37How do you shut a Node service down on SIGTERM without dropping in-flight requests?Advancedpractical45 minIn writing
- 38How do you add timeouts, retries, and backoff to an outbound call without amplifying an outage?Advancedpractical45 minIn writing
- 39A service restarts a few times an hour and nobody knows why. How do you investigate, and what do you change first?Scenarioscenario30 minIn writing
- 40Check your understanding of error propagation, rejection handling, and shutdown behaviour.Basicconceptual15 minIn writing
- 41How does EventEmitter work, and when is it a better fit than passing a callback around?Basicconceptual35 minIn writing
- 42Why does an unhandled 'error' event crash the process, and how do you handle it correctly?Intermediateconceptual35 minIn writing
- 43What is the MaxListenersExceededWarning telling you, and how do you find the leak behind it?Intermediatetroubleshooting40 minIn writing
- 44How do events.once and events.on let you consume an emitter with async/await?Intermediatepractical35 minIn writing
- 45How do you use AbortController and AbortSignal to cancel in-flight work in Node?Advancedpractical40 minIn writing
- 46When does an in-process EventEmitter stop being enough and a real message broker start earning its operational cost?Advanceddesign45 minIn writing
- 47Design the event surface of a job-processing library and defend which events you chose to expose.Scenarioscenario30 minIn writing
- 48Check your understanding of emitters, error events, and cancellation.Basicconceptual15 minIn writing
- 49Design a Node.js API endpoint that exports a large CSV report without loading the entire dataset into memory.Advanceddesign5 min
- 50What are readable, writable, duplex, and transform streams, and when do you reach for each?Intermediateconceptual40 minIn writing
- 51What is backpressure, and what actually happens if you ignore the return value of writable.write()?Advancedconceptual45 minIn writing
- 52Why should you prefer stream.pipeline over .pipe(), and what does it fix about error handling and cleanup?Intermediatepractical40 minIn writing
- 53How do you write a Transform stream that parses newline-delimited JSON without buffering the whole file?Advancedpractical45 minIn writing
- 54How do Node streams and Web Streams interoperate, and when does that conversion actually matter?Advancedpractical40 minIn writing
- 55A file upload endpoint works fine locally and runs the pod out of memory in production. Diagnose it out loud.Scenarioscenario30 minIn writing
- 56Check your understanding of stream types, backpressure, and pipeline error handling.Basicconceptual15 minIn writing
- 57What is a Buffer, how does it relate to a TypedArray, and when do you actually need one?Basicconceptual35 minIn writing
- 58What goes wrong when you slice a UTF-8 buffer at an arbitrary byte offset?Intermediateconceptual35 minIn writing
- 59How do the callback, promise, and sync fs APIs differ, and when is the sync version defensible?Basicpractical35 minIn writing
- 60How do path.join, path.resolve, and __dirname behave, and why does the last one differ under ESM?Basicpractical30 minIn writing
- 61How do you read and process a file that is larger than the memory available to the process?Intermediatepractical40 minIn writing
- 62How do you safely turn a user-supplied filename into a path on disk?Advancedtroubleshooting40 minIn writing
- 63Design the storage layer for user-uploaded files in a Node service and defend the trade-offs you made.Scenarioscenario30 minIn writing
- 64Check your understanding of buffers, encodings, and file-system APIs.Basicconceptual15 minIn writing
- 65Build a server with the core http module and explain what happens to a request from socket to response.Basicpractical40 minIn writing
- 66How do you read a request body in core Node, and which limits must you enforce while doing it?Intermediatepractical40 minIn writing
- 67What do keep-alive, chunked encoding, and Content-Length change about how you write a response?Intermediateconceptual35 minIn writing
- 68How do outbound HTTP requests pool connections in Node, and what does an Agent control?Intermediatepractical40 minIn writing
- 69Which timeouts does the Node HTTP server expose, and what does each one protect you from?Advancedpractical40 minIn writing
- 70What changes when your Node server sits behind a proxy that terminates TLS and speaks HTTP/2?Advancedconceptual40 minIn writing
- 71Requests to your service hang until they time out while CPU sits idle. Walk through what you check and in what order.Scenarioscenario30 minIn writing
- 72Check your understanding of the HTTP request lifecycle, agents, and timeouts.Basicconceptual15 minIn writing
- 73How do Express routing and middleware ordering work, and what does next() actually do?Basicpractical40 minIn writing
- 74What belongs in middleware, and what should never be allowed to live there?Intermediatedesign40 minIn writing
- 75How do Express and Fastify differ in performance, validation, and plugin model, and how would you choose between them?Intermediateconceptual40 minIn writing
- 76Why does a rejected promise in an Express handler silently hang the request, and how do you fix that globally?Intermediatetroubleshooting40 minIn writing
- 77How do you structure a Node API so route handlers stay thin and business rules stay testable?Advanceddesign50 minIn writing
- 78How does AsyncLocalStorage let you carry a request id through a call stack without threading it through every function?Advancedpractical45 minIn writing
- 79Design the module boundaries for a Node API that three teams will work on at once, and defend your layering.Scenarioscenario35 minIn writing
- 80Check your understanding of middleware, framework choice, and service layering.Basicconceptual15 minIn writing
- 81Where should request validation live, and what should a validation failure return to the client?Basicpractical35 minIn writing
- 82How do schema libraries like Zod give you a runtime check and a TypeScript type from a single definition?Intermediatepractical40 minIn writing
- 83What does JSON.stringify do to dates, BigInt, undefined, and circular references?Intermediateconceptual35 minIn writing
- 84Why is JSON serialization often the hottest function in a Node API, and what do you do about it?Advancedpractical40 minIn writing
- 85How do you evolve a JSON API without breaking clients you cannot deploy?Advanceddesign45 minIn writing
- 86How do you keep an OpenAPI document honest about what the server actually accepts and returns?Advancedpractical40 minIn writing
- 87A client reports intermittent 500s on a field they insist they always send. How do you find the truth?Scenarioscenario30 minIn writing
- 88Check your understanding of validation boundaries, JSON behaviour, and contract evolution.Basicconceptual15 minIn writing
- 89How do spawn, exec, execFile, and fork differ, and which one runs an external command safely?Intermediatepractical40 minIn writing
- 90When does a worker thread beat a child process, and how do you move data between them cheaply?Advancedpractical45 minIn writing
- 91What does the cluster module do, and why is one process per core the usual answer?Intermediateconceptual40 minIn writing
- 92Where does shared state live once you run more than one Node process?Advanceddesign45 minIn writing
- 93A request needs 400ms of pure CPU. What are your options, and how do you choose between them?Advanceddesign45 minIn writing
- 94How do you run background work in a Node deployment without a job silently dying unnoticed?Advanceddesign45 minIn writing
- 95Your service pins one core at 100% while the rest of the box is idle. What do you propose, and in what order?Scenarioscenario35 minIn writing
- 96Check your understanding of workers, clustering, and CPU-bound work.Basicconceptual15 minIn writing
- 97A production Node.js service's event loop is blocked for multiple seconds under load, causing request timeouts. Walk through how you'd find and fix the cause.Scenarioscenario5 min
- 98How do you capture and read a CPU profile from a running Node process?Advancedpractical50 minIn writing
- 99How do you use heap snapshots to prove where a memory leak is actually coming from?Advancedtroubleshooting50 minIn writing
- 100What are the usual causes of a Node memory leak, and which one do you check first?Intermediatetroubleshooting40 minIn writing
- 101How do you benchmark a Node function without fooling yourself?Intermediatepractical40 minIn writing
- 102What do --max-old-space-size and the garbage collector actually control, and when is tuning them the right move?Advancedpractical45 minIn writing
- 103p99 latency tripled after a deploy while p50 did not move. How do you find the cause?Scenarioscenario35 minIn writing
- 104Check your understanding of profiling, heap analysis, and Node performance limits.Basicconceptual15 minIn writing
- 105How should a Node service load its secrets, and why is a committed .env such a common cause of a breach?Basicpractical35 minIn writing
- 106How do SQL injection and command injection actually reach a Node service, and what stops each of them?Intermediateconceptual40 minIn writing
- 107How do you decide whether a new npm dependency is worth the risk it adds?Intermediatepractical40 minIn writing
- 108How do you store and verify sessions or tokens in a Node API without rolling your own crypto?Advanceddesign45 minIn writing
- 109How do you stop a single client from trivially overwhelming a Node API?Advancedpractical45 minIn writing
- 110What is prototype pollution, and how does untrusted JSON turn into it?Advancedtroubleshooting40 minIn writing
- 111A dependency you ship publishes a compromised version. Walk through what you do over the next hour.Scenarioscenario35 minIn writing
- 112Check your understanding of secrets, injection, and dependency risk.Basicconceptual15 minIn writing
- 113What does the built-in node:test runner give you, and when would you still reach for Vitest or Jest?Basicpractical35 minIn writing
- 114Where do you draw the line between unit and integration tests in a Node API?Intermediateconceptual40 minIn writing
- 115What should you mock in a Node service, and what should you refuse to mock?Intermediatepractical40 minIn writing
- 116How do you test asynchronous code without flaky timeouts and leaked handles keeping the process alive?Intermediatetroubleshooting40 minIn writing
- 117How do you test HTTP handlers and database access without a shared, dirty test database?Advancedpractical45 minIn writing
- 118What should a Node CI pipeline run on every push, and what does a coverage number actually tell you?Advancedpractical40 minIn writing
- 119A suite passes locally and fails one run in ten in CI. How do you make it trustworthy again?Scenarioscenario30 minIn writing
- 120Check your understanding of test boundaries, mocking, and async test reliability.Basicconceptual15 minIn writing
- 121What makes a log line useful in production, and why structured JSON instead of console.log?Basicpractical35 minIn writing
- 122What do metrics, logs, and traces each answer, and what does OpenTelemetry give a Node service?Intermediateconceptual45 minIn writing
- 123What should a liveness probe check, and how is that different from readiness?Intermediatepractical35 minIn writing
- 124What can you inspect on a live Node process in production without restarting it?Advancedtroubleshooting50 minIn writing
- 125How do you configure, containerize, and deploy a Node service so that restarts are boring?Advancedpractical45 minIn writing
- 126Design, instrument, and defend a production Node.js service end to end.Scenariodesign240 minIn writing
- 127How would you convince a sceptical reviewer that your Node service is ready for production traffic?Scenarioscenario30 minIn writing
- 128Check your understanding of logging, observability, and production operations.Basicconceptual15 minIn writing