Network notebook

Short notes on the parts of a network that usually go unnoticed.

Names and addresses

A domain name and an IP address have different jobs. DNS maps a name to an address. TLS checks whether a server can prove its identity for that name. A cached address can keep working after DNS has changed; a stale one can send a new connection to a server that has moved.

The time to live on a DNS record tells a resolver how long it can reuse an answer. Lowering it helps future changes propagate sooner, but it does not remove answers that resolvers have already cached.

Packet size

The maximum transmission unit limits the size of an IP packet on a link. Adding another network header leaves less space for the original payload. A path that carries short messages successfully can still fail on larger transfers if path MTU discovery is broken.

Small requests, large downloads, and long-lived connections exercise different parts of a network. Testing all three is more informative than checking whether a port accepts a connection.

Connections and streams

HTTP/2 can carry several independent streams over one connection. This saves repeated handshakes, although packet loss on the shared TCP connection can delay all of its streams. Opening more connections changes that tradeoff and also increases the work done by both endpoints.