MediumScenarioRuntime and event loop
A script prints output in a surprising order mixing promises, nextTick and setTimeout. How do you reason about it?
This answer is part of Pro
10 of 67 Node.js Developer answers are free. A Pro pass opens the rest, including hands-on task steps.
PreviousYour API latency spikes while one endpoint runs a big JSON transform. What do you do?Next CPU hits 100% on one core of an eight-core server under load. How do you scale?