Node runtime internals
Node.js Event Loop Visualizer
Understand Node.js queues, process.nextTick, Promises, timers, I/O poll, setImmediate, close callbacks, and the thread pool.
Node has multiple queues and phases. nextTick and Promise microtasks can run before timers, while I/O, check callbacks, and worker-pool callbacks depend on the selected runtime path.
What makes Node different
Node adds runtime-specific behavior: nextTick, libuv phases, I/O polling, check callbacks, close callbacks, and a shared worker pool for selected APIs.
What to inspect
Use the Node Runtime Lab to inspect queue priority, active phase, console order, thread-pool pressure, blocked time, streams, memory, and problem vs fixed code.
Production connection
This helps explain slow endpoints, delayed I/O callbacks, worker-pool starvation, stream stalls, and event loop blocking in real Node services.
Practice this topic
Start with the strongest case, then continue through related examples.
Promise before timeout
Microtasks run before timers after the stack clears.
Node queue priority
Debug flaky tests, CLI startup order, stream internals, and server callbacks that appear to run out of order.
setTimeout 0
Useful when you need to defer UI work until after the current event handler.
Timeout inside promise
This shows up in promise-based setup that schedules fallback timers.
Promise inside timeout
This affects promise work triggered inside DOM events, timers, and network callbacks.