r/node • • 1d ago

Node.js' Event Loop Delay monitor has been lying to you (for years)

https://jomi-se.com/posts/nodejs-event-loop-delay-monitor/

In Node.js, if your event loop blocks for 30 seconds with a monitor that has a 60-second window and 50 milliseconds resolution, you'll get a p99 event loop delay of 52 milliseconds. And if you're lucky, the 30-second delay might show up in the max of the event loop delay monitor.

I wrote a blog post about it. The twist at the end was a bit funny (the fix has been sitting in the codebase since 2019). It almost features no AI.

Coordinated omission. Also, this talk is probably important too: How NOT to measure latency

16 Upvotes

5 comments sorted by

3

u/kurtextrem 1d ago

Great read!

1

u/jomi-se 13h ago

Thank you 🙌