The idea
Computers communicate by agreeing on protocols at multiple abstraction layers. The
OSI model defines 7 layers: Physical, Data Link, Network (IP), Transport (TCP/UDP), Session, Presentation, Application (HTTP). The simplified
TCP/IP stack has 4: Link, Internet, Transport, Application.
TCP provides reliable, ordered, connection-oriented delivery via a three-way handshake and acknowledgement. UDP is connectionless and unreliable—no handshake, no ordering—but has lower latency. Video streaming, DNS, and QUIC use UDP.
HTTP/3 (QUIC) runs over UDP, eliminating TCP's head-of-line blocking. A single lost packet no longer stalls all streams. This dramatically improves performance on lossy mobile networks—critical for AI API latency.
RTT = 2 × (propagation delay + transmission delay + queuing delay)
Round Trip Time: the total time for a request to reach the server and the response to return.