Node.js HTTP & Networking

Parent: JavaScript and Node.js · researched 2026-06-02T18:02:34.004Z· 10 sources · 8 concepts · skill nodejs-http-networking

This reference is the networking + HTTP core of Node plus the modern HTTP client:

Overview

1. `node:http` — server lifecycle, IncomingMessage/ServerResponse, request & Agent

2. `node:http` — server & socket timeouts (the anti-slowloris knobs)

3. `node:http2` — secure/insecure servers, sessions, streams, ALPN, compatibility API

4. `node:https` + `node:tls` — secure context, SNI, ALPN, session resumption

5. `node:net` — the TCP connection model, allowHalfOpen, Nagle, keep-alive

6. `node:dgram` — UDP sockets (brief)

7. The global `fetch` **is** undici — Dispatcher, Client, Pool, Agent

8. undici keep-alive & timeout options (the client-side mirror of §2)

Methodology / practical patterns

Anti-patterns

Troubleshooting

References

Children

Frontier under this node: The global fetch as undici (Dispatcher/Client/Pool/Agent, interceptors, RetryAgent/ProxyAgent/MockAgent, setGlobalDispatcher), node:dgram UDP sockets and multicast, node:http server & socket timeouts (headersTimeout/requestTimeout/keepAliveTimeout/maxRequestsPerSocket), node:http server lifecycle, IncomingMessage/ServerResponse, http.request, http.Agent, node:http2 (secure/insecure servers, sessions/streams, ALPN, server push, compatibility API), node:https + node:tls (createSecureContext, SNI, ALPN, session resumption), node:net TCP connection model (allowHalfOpen, Nagle/setNoDelay, setKeepAlive, BlockList), undici keep-alive & timeout options (pipelining, keepAliveTimeout, keepAliveMaxTimeout, headersTimeout, bodyTimeout)

← the whole tree · 3D view· how to read this page