All fields

“Advanced Node.js” in Information Technology

56 questions across 1 technology.

Information Technology

56 questions in 1 technology

#QuestionTechnologyTopicLevel
1How does Node.js's built-in test runner (node:test) compare to third-party frameworks like Jest or Mocha? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
2What are Node.js Single Executable Applications (SEA), and what are their current limitations? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
3What is the libuv library, and what specific role does it play inside Node.js? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
4How do you use the --inspect flag and Chrome DevTools to profile a running Node.js application in production? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
5What are Node.js's built-in diagnostic reports, and how do you generate one? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
6What is V8's hidden class mechanism, and why does it matter for writing performant Node.js code? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
7What is backpressure in Node.js streams, and how do you handle it correctly when piping data? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
8How does Node.js implement the Worker Threads module differently from Child Processes, and when should each be used? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
9What is monkey-patching in the context of Node.js APM (Application Performance Monitoring) tools, and what are its risks? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
10How do you detect and prevent event loop blocking in a long-running Node.js service? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
11What are Node.js's experimental permission model flags, and what problem do they address? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
12What is a memory leak in the context of a long-running Node.js server, and what are the most common causes? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
13What is the difference between process.nextTick(), setImmediate(), and setTimeout(fn, 0) in terms of execution order? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
14What is the AsyncLocalStorage API, and what problem does it solve for tracking context across asynchronous calls? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
15What is the node:diagnostics_channel module, and how does it differ from simply emitting a custom event? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
16What is the V8 JavaScript engine, and what role does it play within the Node.js runtime? Node.js › Node.js Fundamentals & Runtime ArchitectureNode.jsNode.js Fundamentals & Runtime ArchitectureIntermediate
17What is the os.cpus() function used for when setting up clustering in a Node.js application? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsBeginner
18What is the difference between operational errors and programmer errors in Node.js, and why does this distinction matter? Node.js › Error HandlingNode.jsError HandlingBeginner
19What is the event loop, and why does it allow Node.js to handle many concurrent operations despite being single-threaded? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOBeginner
20What is the difference between concurrency and parallelism, and which one does Node.js's event loop actually provide by default? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOBeginner
21What is a callback queue (or task queue) in the context of the Node.js event loop, and how does it relate to the call stack? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOBeginner
22What is the difference between fs.unlink() and fs.rmdir() (or the newer fs.rm()) in Node.js? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingBeginner
23What is the difference between micro tasks and macro tasks in Node.js's event loop, and how does this affect Promise callback ordering? Node.js › Async PatternsNode.jsAsync PatternsIntermediate
24Why does Node.js provide a cluster module, given that a single Node.js process is single-threaded? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsIntermediate
25What is the difference between the number of CPU cores and the optimal number of cluster workers for a given Node.js application? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsIntermediate
26How would you create and use custom Error subclasses in a Node.js application to represent different categories of application-specific errors? Node.js › Error HandlingNode.jsError HandlingIntermediate
27How do you correctly propagate and handle errors from a Node.js stream, given that stream errors aren't caught by a surrounding try/catch? Node.js › Error HandlingNode.jsError HandlingIntermediate
28What does it mean that Node.js's I/O is handled by libuv, and how does libuv abstract different operating systems' I/O mechanisms? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
29How would you safely check if a file exists in Node.js before attempting to read it, avoiding a race condition? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
30What is load testing, and how would you use a tool like autocannon or k6 to benchmark a Node.js API's throughput and latency? Node.js › Performance Optimization & ProfilingNode.jsPerformance Optimization & ProfilingIntermediate
31What is 'fire-and-forget' async code, and why is it generally discouraged in production Node.js applications? Node.js › Async PatternsNode.jsAsync PatternsAdvanced
32How do you implement job prioritization in a Node.js queue system, and when is it necessary? Node.js › Background Jobs & QueuesNode.jsBackground Jobs & QueuesAdvanced
33How do you use SharedArrayBuffer to share memory directly between Node.js worker threads, and what are the safety considerations? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsAdvanced
34How would you implement a global error boundary for an entire Node.js application to ensure no error type goes completely unhandled? Node.js › Error HandlingNode.jsError HandlingAdvanced
35What are the distinct phases of the Node.js event loop, and what kind of callbacks does each phase execute? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
36What is the difference between how Node.js handles I/O-bound concurrency versus CPU-bound work, and why does this distinction shape Node.js's ideal use cases? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
37How would you use async_hooks (the lower-level predecessor to AsyncLocalStorage) to trace the lifecycle of asynchronous resources in Node.js? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
38How would you implement atomic file writes in Node.js to avoid leaving a file in a corrupted, half-written state if the process crashes mid-write? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingAdvanced
39How would you process and resize an uploaded image in Node.js using the sharp library, and why is sharp generally preferred over pure-JavaScript alternatives? Node.js › File Uploads & Media ProcessingNode.jsFile Uploads & Media ProcessingAdvanced
40How would you implement a simple TCP-level proxy or load balancer in Node.js using the net module, distinct from an HTTP-level reverse proxy? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersAdvanced
41What is the default maximum listener limit on an EventEmitter, and why does Node.js warn when it's exceeded? Node.js › Events & EventEmitterNode.jsEvents & EventEmitterAdvanced
42How do you use the built-in 'debugger' statement together with Node's --inspect flag to set breakpoints in code? Node.js › Debugging & DiagnosticsNode.jsDebugging & DiagnosticsBeginner
43How do you create a custom class that emits events by extending Node's built-in EventEmitter? Node.js › Events & EventEmitterNode.jsEvents & EventEmitterBeginner
44How does PM2's cluster mode compare to manually using Node's built-in cluster module directly in application code? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsIntermediate
45How do you pass data between the main thread and a worker thread using postMessage(), and what are the limits on what can be sent? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsIntermediate
46How does setImmediate() differ from process.nextTick() in terms of timing and typical use cases? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
47What is the difference between fs.stat() and fs.lstat(), and when does the distinction matter? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
48How does inter-process communication (IPC) work between a parent process and a child created with fork()? Node.js › Child Processes & Process ManagementNode.jsChild Processes & Process ManagementIntermediate
49How do you use Node's built-in heap snapshot capability to diagnose a suspected memory leak? Node.js › Debugging & DiagnosticsNode.jsDebugging & DiagnosticsIntermediate
50What happens when an EventEmitter emits an event that has an 'error' listener versus one that doesn't? Node.js › Events & EventEmitterNode.jsEvents & EventEmitterIntermediate
51How does the 'once' method differ from 'on' when subscribing to an EventEmitter's events, and when would you use it? Node.js › Events & EventEmitterNode.jsEvents & EventEmitterIntermediate
52What is a worker thread pool, and why would you build one rather than creating a new Worker for every task? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsAdvanced
53What is the WorkerData option when creating a Worker, and how does it differ from communicating via postMessage() after creation? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsAdvanced
54What is the difference in behavior between the 'primary' and 'worker' role in Node's cluster module regarding which code paths execute? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsAdvanced
55What is the poll phase of the event loop, and under what specific conditions does it block waiting versus move on immediately? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
56What is JIT (Just-In-Time) compilation deoptimization in V8, and how can you detect when it's hurting a hot function's performance? Node.js › Performance Optimization & ProfilingNode.jsPerformance Optimization & ProfilingAdvanced