Posts tagged “undici”
UV_THREADPOOL_SIZE in Node.js: when DNS lookups, crypto and fs wait in the same line
Outbound calls slow down under load while CPU stays low? DNS lookups, crypto and fs share libuv's 4-thread pool in Node. How to reproduce the queue, measure it per upstream, and set UV_THREADPOOL_SIZE.
ECONNRESET, ETIMEDOUT, ECONNREFUSED: what each means in your Node logs
ECONNREFUSED, ETIMEDOUT and ECONNRESET look alike in a log and have different causes. What each one means, how to tell inbound from outbound, and the fixes: keep-alive timeouts, explicit timeouts, and retries only on idempotent calls.
Third-party API latency: measuring vendor slowness and failures in Node
The vendor status page is green and your checkout is slow. Here is how to measure third-party API latency and failures from your own Node servers, per dependency, without wrapping fetch.
SSRF in Node.js: the fetch() you didn't mean to make
A customer pastes a webhook URL pointing at your cloud metadata endpoint, and your API fetches it. Learn how SSRF in Node.js happens, why blocklists on URL strings fail, and a tested safeFetch() you can ship today.
How to log outbound HTTP requests in Node.js
Your API threw 502s because a provider was timing out, and your logs said nothing. Log outbound HTTP requests from fetch and axios with diagnostics_channel in an afternoon, then read error rate and p95 per host.
Node.js fetch timeout: deadlines with AbortSignal and undici
One slow vendor and every handler hangs, because Node fetch waits up to five minutes by default. Here is how to set deadlines with AbortSignal and undici in Express and Fastify.