Interview prompt
Explain async code still runs on an event loop to an engineer who understands the surrounding system but has not used this technique. Walk from its contract to a concrete operation, then discuss where it fails or becomes expensive.
A strong answer
An event loop repeatedly selects ready work and runs callbacks or tasks. Asynchronous I/O lets a program arrange for completion to be reported later so the thread can do other work meanwhile. The syntax may look sequential, but the runtime schedules continuations according to its queues and rules.
When a Node.js handler starts a network request, the runtime registers work with the operating system or an internal pool. The JavaScript callback runs after completion is reported and scheduled. A long synchronous calculation inside one callback still occupies the event-loop thread and delays unrelated requests.
A complete answer also calls out the assumptions that control correctness. Async does not mean parallel, and adding await does not make CPU-heavy work nonblocking. Queue ordering differs across runtimes and task classes. Unhandled rejections, cancellation, and timeouts need explicit policies so stalled work does not linger indefinitely.
Close by describing one representative test or measurement. A service has fast network I/O but slow response times whenever it generates a large report. Explain how an event-loop blocker creates that symptom and how you would move or divide the computation.
Follow-up questions
Answer the follow-ups in the frontmatter. Use the linked article for the concept and the trace to make the explanation concrete.