Deep Dive
How the Libuv Threadpool Starves Your DNS Lookups
Node's DNS and file system work share a threadpool of four threads by default, and one slow file read queues every lookup behind it, so the event loop is…
Module resolution, memory leaks, event loop stalls and the ESM and CommonJS boundary that breaks builds.
Deep Dive
Node's DNS and file system work share a threadpool of four threads by default, and one slow file read queues every lookup behind it, so the event loop is…
Code Review
A catch that returns a fallback converts a failure into a value, and the caller downstream treats the fallback as data.
Security
The payload was ordinary JSON and the merge was ordinary code, but a __proto__ key in the body wrote to Object.prototype, and every object in the process…
Bug Hunt
The monthly report ran in some months and silently vanished in others, and the pattern was the calendar. A day arithmetic bug that only fires on the 31st is…
Performance
CPU at forty percent, memory fine, and requests timing out. The Node process is not busy, it is blocked, and the only metric that shows the difference is…
Performance
The query took forty milliseconds and the endpoint took nine hundred and forty. The difference was serialisation: building and stringifying forty megabytes…
Code Review
Locks and shared state look correct in the single threaded reading of a review and fail only under contention, which is exactly the condition review never…
Deep Dive
setTimeout zero and setImmediate are not the same thing, and which one runs first depends on where in the event loop you called them.
Bug Hunt
Every file under a megabyte arrived intact. Every file over it arrived truncated at exactly the same boundary.
Error Autopsy
Your code did nothing wrong and still the process crashed with EPIPE. The other end closed the socket first, and your runtime turned an ordinary network…
Node.js
The quick fix is raising ulimit. The real question is what is holding thousands of descriptors open and never closing them.
Bug Hunt
The classic heisenbug. Here is why observation changed the outcome, and the three techniques that found it anyway.