Skip to content
Preptima

Top 4 Event loop Interview Questions

Browse 4 real-world technical and behavioral interview questions about Event loop. Review scenarios, edge cases, and architectural best practices.

Your Node service has low CPU but latency spikes for every request at the same moment. What is happening?

Node.js event loop blocking happens when synchronous JavaScript, JSON work, crypto, regex or CPU-heavy code occupies the shared thread. The signal is every endpoint slowing together while event loop delay rises.

mediumscenario

Walk me through the phases of the Node event loop.

Node.js event loop phases explain callback ordering across timers, poll, check, nextTick and promise microtasks. Correct answers separate macro-task phases from microtasks instead of memorising one log order.

mediumconcept

Field data says your page has an INP of 400 ms. How do you find the cause and fix it?

Split the interaction into input delay, processing time and presentation delay, then attribute a real interaction from the field rather than guessing. Most of the budget is usually spent before your handler runs or after it returns, so yielding and cutting rendering cost beats optimising the handler.

hardconcept

Here is a script mixing setTimeout, a promise chain and an await. Tell me the order the logs come out in, and why.

The engine finishes the current task, then drains the whole microtask queue before taking another task, so every promise callback and await resumption runs before a zero-delay timeout, in the order each was queued. Use this event loop answer to show the decision, trade-off, and evidence rather than a memorised definition. It also connects microtasks to the point an interviewer is testing.

mediumcoding