HTTP Servers, Clients & Proxies

Every subchapter in this chapter, free to read online. Work through them in order, or jump straight to the runtime detail you need.

10
chapter
7
subchapters
Free
online
01

HTTP/1.1 Wire Format

Read HTTP/1.1 as bytes: start lines, headers, body framing, chunked transfer coding, connection rules, and interim responses.

02

http.Server Lifecycle

Trace one inbound HTTP request through http.Server, accepted sockets, IncomingMessage, ServerResponse, header commits, early bodies, parser errors, timeouts, and connection reuse.

03

HTTP Parsing with llhttp

How Node.js turns HTTP/1.1 bytes into IncomingMessage objects through llhttp state, parser callbacks, header limits, body delivery, errors, trailers, and upgrade handoff.

04

Routing and Middleware

Build a small framework-free HTTP handler with method and path routing, middleware composition, bounded JSON body parsing, and deliberate error responses.

05

Keep-Alive, Agents, and Pools

How Node.js reuses HTTP/1.1 TCP connections through keep-alive, http.Agent pools, server idle timers, stale pooled sockets, and reuse limits.

06

fetch and Undici

How outbound HTTP works in Node.js, from http.request() and ClientRequest through fetch, Undici dispatchers, pools, redirects, decoding, and pipelining.

07

Proxies, Static Files, and Streaming

Build the HTTP boundary where Node forwards requests, streams bodies, filters connection metadata, and serves file-backed responses.

Other chapters

13 more