Went through the usual points: TCP is connection-oriented, has handshake, guarantees ordering and delivery.
Start by defining TCP and UDP in one sentence each, then contrast them across key dimensions like connection, reliability, ordering, speed, and use cases. Conclude by explaining how these differences drive real-world protocol choices, especially in system design contexts.
Pro tip: Don't just list differences—tie them to trade-offs and concrete examples (e.g., HTTP/3 uses QUIC over UDP for speed while adding reliability at the application layer). This shows you understand when to choose each protocol, not just what they are.
State that TCP is connection-oriented and reliable, while UDP is connectionless and best-effort. This sets the foundation for all other differences.
Contrast them on reliability (acknowledgments/retransmissions vs none), ordering (sequenced vs unordered), speed/overhead (header size, congestion control), and connection setup (handshake vs none).
Give examples: TCP for web (HTTP/1.1, HTTP/2), email (SMTP), file transfer (FTP); UDP for DNS, VoIP, video streaming, online gaming, and QUIC (HTTP/3).
Explain that choosing between them depends on requirements: reliability vs latency, and mention that some systems build reliability on top of UDP when needed (e.g., QUIC).
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.