Reuse connections for outbound HTTP
A fresh TLS handshake on every request costs one to three round trips. Node's fetch reuses connections by default through undici, but the older http module won't unless you give it an agent.
import { Agent, setGlobalDispatcher } from "undici";
setGlobalDispatcher(new Agent({ keepAliveTimeout: 10_000, connections: 64 }));Check with the curl -w timings. If connect and tls are non-zero on every call from your service, connections aren't being reused.
httpperformance