These transport protocols determine how data physically moves between machines. Everything above — HTTP, WebSockets, gRPC — runs on top of one or the other.
Property
TCP
UDP
Connection
Connection-oriented (handshake)
Connectionless
Reliability
Guaranteed delivery + ordering
No guarantees
Speed
Slower (overhead)
Faster
Header size
20 bytes minimum
8 bytes
Use case
HTTP, email, file transfer
Video, gaming, DNS, VoIP
Free for students and teachers
Write notes like this one
Cards for every idea, quizzes and flashcards, read aloud — on the web and your phone.