Part 0 · 2 chapters · ~12 min

Layers, Honestly

What each layer adds and promises, encapsulation (headers inside headers), the OSI and TCP/IP models and where reality differs, ports and sockets, end-to-end arguments, and following one request through every layer.

1

Layers and encapsulation

code
one HTTPS request, wrapped layer by layer (sizes typical)
[ Ethernet 14 B | IP 20 B | TCP 20-60 B | TLS record 5 B + 16 B tag | HTTP request ... ] FCS 4 B
each hop strips and rebuilds only the link layer; IP and above travel end to end
THE LAYERS, HONESTLY
each layer wraps the one above with a header and a promise
applicationHTTP, DNS, gRPC: meaningsecurity (TLS)encryption, authentication of the servertransport (TCP / UDP / QUIC)ports, reliability or not, ordering, congestionnetwork (IP)addresses, routing across networks, best effortlink (Ethernet, Wi-Fi)frames between neighbours, MAC addressesphysicalbits on copper, fibre, radio
swipe the figure sideways, or tap expand for full screen
1/6
application
HTTP, DNS, gRPC and your protocols carry meaning. They assume a byte stream or datagrams below them.
meaningHTTP, DNS, gRPC
2

The end-to-end argument

Saltzer, Reed and Clark's end-to-end argument (1984): functions such as reliability and security can only be completely implemented at the endpoints; the network in the middle should stay simple. That is why IP is best effort and TCP (in the hosts) provides reliability, and why your application still needs idempotency even over TCP: a TCP connection can deliver every byte and the request can still be processed twice after a retry (Ledgers part 2).