TCP vs UDP
TCP and UDP compared: connections and the three-way handshake, reliable ordered delivery, flow and congestion control, UDP's minimal datagrams, which applications use which and why, QUIC and HTTP/3 built on UDP, and a working socket example of each in Python.
CodexBash, , 5 min read
Nearly everything on the internet travels over one of two transport protocols. TCP delivers a reliable, ordered stream of bytes, retransmitting anything lost, and is used by the web, email, SSH and databases. UDP sends independent packets with no guarantees at all, and is used by DNS, video calls, online games and, increasingly, the web itself through HTTP/3. Neither is better; they make opposite trade-offs between reliability and speed and control. This article explains both and when each fits.
Sign in to read the rest
The whole 5 minute article is free with an account, along with every problem, lesson and tutorial. No card.