Two philosophies
TCP gives you a reliable, ordered byte stream — at the cost of handshakes, acknowledgements, and retransmissions. UDP just fires packets and forgets — no guarantees, but minimal overhead.
Choosing
- TCP: web pages, APIs, file transfer — anything where a missing byte corrupts the result.
- UDP: live video, games, DNS — where a dropped packet is better than a late one.
Key idea
TCP's reliability isn't free: head-of-line blocking means one lost packet stalls everything behind it. That's exactly why real-time media often prefers UDP and rebuilds only the reliability it needs.