Networking: DNS, TCP, TLS and HTTP
Network behavior is a chain of independently failing boundaries, not a single request hop.
Networking: DNS, TCP, TLS and HTTP
Network behavior is a chain of independently failing boundaries, not a single request hop. DNS resolves names and may be answered from browser, OS, resolver or edge caches. TCP provides an ordered byte stream and congestion control; UDP provides datagrams without TCP delivery guarantees. TLS authenticates the peer and protects the channel. HTTP defines application request/response semantics. HTTP/2 multiplexes over TCP; HTTP/3 uses QUIC over UDP.
Mechanism and worked example
A browser resolves api.example, reuses or opens a connection, validates the certificate, sends HTTP to an edge proxy, and reaches an origin only on a cache miss. DNS success does not prove origin reachability; TCP success does not prove application health.
| Layer | Responsibility | Failure signal |
|---|---|---|
| DNS | Resolve service name | NXDOMAIN, SERVFAIL or stale address |
| TCP / QUIC | Transport and congestion | Handshake failure, reset or retransmission |
| TLS | Peer identity and channel protection | Certificate or trust error |
| HTTP / RPC | Application contract | Status, deadline or authorization error |
Failure modes and operations
Account for stale DNS, connection-pool exhaustion, TLS expiry, packet loss, proxy idle timeouts, MTU issues and origin overload. A timeout does not reveal whether a mutation committed. Bound connection acquisition and propagate an end-to-end deadline.
Trade-offs and design boundary
Persistent connections reduce handshakes but can pin traffic unevenly. HTTP/2 improves multiplexing but shares TCP loss behavior. HTTP/3 can improve stream loss isolation but requires deployment support. UDP is not automatically faster for every workload.
Interview transfer exercise
A client times out after POST /orders. Explain how it retries without creating a duplicate order. Expected: reuse the same idempotency identity or query the operation outcome; the server may have committed before the response was lost.
Read the diagram
Browser resolves DNS → Client establishes transport and TLS → HTTP reaches edge proxy → Edge routes cache miss to origin