Network Fundamentals with Node.js

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

Start with the first topic9.1 TCP/IP Networking
09chapter
7topics
Freeonline

Topics

7 topics

TCP/IP Networking

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

DNS Resolution

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

TCP Flow & Failure

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

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.

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.

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.

Request Path

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