Signal Path/Transport
📦🔀🌐
STAGE 7 OF 16↓ request path

Transport

Reliable delivery across the internet

A TCP three-way handshake opens a connection (SYN → SYN-ACK → ACK), or QUIC does a 1-RTT handshake over UDP with built-in encryption. Your packets traverse multiple autonomous systems to reach the server.

📖

How It Works

The transport layer's job is to deliver data reliably between two endpoints identified by IP address + port. TCP (RFC 9293) is the workhorse: it opens a connection with a three-way handshake (SYN → SYN-ACK → ACK), guarantees in-order delivery, handles retransmission of lost packets, and manages flow control so a fast sender doesn't overwhelm a slow receiver. Each direction of the connection is an independent byte stream.

QUIC (RFC 9000) is the modern alternative, designed by Google and standardized by the IETF. It runs over UDP, integrates TLS 1.3 encryption into the handshake (saving a round trip vs TCP+TLS), and natively supports multiplexed streams — so a lost packet on one stream doesn't block others (solving TCP's head-of-line blocking problem). HTTP/3 runs exclusively over QUIC. Meanwhile, your IP packets traverse the internet by hopping through routers that use BGP (Border Gateway Protocol) to find the best path across autonomous systems.

The Signal Flow

Socket created
OS allocates a socket — a (protocol, local IP, local port, remote IP, remote port) tuple
TCP: SYN sent
Client sends SYN with initial sequence number (ISN) — 'I want to connect'
TCP: SYN-ACK received
Server responds with SYN-ACK — 'Acknowledged, here's my ISN'
TCP: ACK sent
Client sends ACK — connection established. Data can flow in both directions.
IP routing
Each packet hops through 10–20 routers, selected by BGP routing tables
Connection ready
Reliable bidirectional byte stream established between client and server
💡

Key Concepts

🤝Three-way handshake

TCP's connection setup: SYN → SYN-ACK → ACK. This takes 1 round-trip time (RTT) and exchanges initial sequence numbers. It's why new connections have latency — a server 50 ms away means 50 ms just for the handshake.

📦Segments and sequence numbers

TCP breaks your data into segments, assigns each a sequence number, and reassembles them in order at the receiver. If a segment is lost, the receiver's ACK tells the sender to retransmit. This guarantees in-order, lossless delivery.

📊Congestion control

Algorithms that prevent senders from overwhelming the network. TCP Cubic starts slow and ramps up; BBR (Bottleneck Bandwidth and RTT) estimates the actual network capacity. Without congestion control, the internet would constantly collapse.

QUIC 0-RTT

If you've connected to a server before, QUIC can send data in the very first packet — zero round trips of latency. The client reuses a cached key from the previous connection. HTTP/3 leverages this for near-instant reconnections.

🔬

Deep Dive

🔀

How IP routing works

Every IP packet has a destination address. Each router on the path examines this address, looks up the best next hop in its routing table (built by BGP for inter-domain routing), and forwards the packet. A typical web request traverses 10–20 hops across multiple autonomous systems (AS) — each AS is a network operated by a single organization (ISP, cloud provider, enterprise). The path is dynamic: BGP can reroute around failures in seconds, but it can also be hijacked (BGP hijacking) if an AS announces routes for IP space it doesn't own.

🚫

Head-of-line blocking

TCP delivers bytes in strict order. If packet #3 out of 5 is lost, packets 4 and 5 must wait in the receiver's buffer until packet 3 is retransmitted — even though they arrived fine. This is head-of-line blocking, and it's especially painful for HTTP/2 which multiplexes many requests over one TCP connection. QUIC solves this: each QUIC stream is independent, so loss on one stream doesn't delay others. This is the primary motivation for HTTP/3.