Purpose

Frame the transport choice that every application-layer protocol makes before the notes on individual protocols.

Core idea

Applications built on TCP can transfer arbitrary-length data and get reliability and flow control for free. Some applications do not need those guarantees, and some actively cannot afford them. Internet telephony and online games run on UDP because a retransmitted packet arrives too late to be useful, and the delays TCP introduces waiting for in-order delivery hurt more than the losses do. The protocol notes in this section, HTTP and DNS, show one of each. HTTP rides on TCP because pages must arrive intact, while DNS rides on UDP because a lookup is one small message and a retry is cheap.