Network Fundamentals with Node.js

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

09
chapter
7
subchapters
Free
online
01

TCP/IP Networking

How Node.js networking depends on OS sockets, TCP/IP state, addresses, ports, routing, link-layer resolution, MTU, and libuv handles.

02

DNS Resolution

How Node.js resolves hostnames through dns.lookup, dns.resolve, OS resolver behavior, c-ares, recursive DNS, TTLs, caching, and address ordering.

03

TCP Flow & Failure

How Node.js TCP connections move through handshake, flow control, ordered delivery, FIN, RST, ECONNRESET, EPIPE, ETIMEDOUT, and shutdown.

04

Sockets and net

How Node.js net.Server and net.Socket wrap OS socket state, libuv TCP handles, connection events, writes, shutdown, timeouts, and IPC endpoints.

05

UDP and dgram

How Node.js UDP sockets work through dgram, datagram framing, send and message events, bind state, broadcast, multicast, connected UDP, and errors.

06

Socket Options & Backlog

How Node.js exposes socket options including keepAlive, noDelay, backlog, SO_REUSEADDR, send and receive buffers, IPv4/IPv6 binding, and dual stack behavior.

07

Request Path

Trace a Node.js connection from hostname lookup through address selection, routing, TCP connect, accept queues, libuv readiness, and JavaScript callbacks.

Other chapters

13 more