TCP vs UDP
TL;DR
- UDP: fire and forget.
- TCP: guaranteed delivery and the correct order of the packets.
TCP vs UDP
TCP (Transmission Control Protocol)
- A connection-based protocol that provides a reliable flow of data between two computers.
- Example: HTTP, FTP, Telnet
- Use socket
- Use the packet's 5-tuple (source IP address, destination IP address, source port, destination port, and protocol number) to uniquely identifies which connection it belongs to.
UDP (User Datagram Protocol)
- A protocol that sends independent packets of data, called datagrams, from one computer to another with no guarantees about arrival. UDP is not connection-based like TCP.
- Example: time request, ping
- Use datagram
Recommended ReadingSponsored

Networking Classic Bible
Computer Networking: A Top-Down Approach
By James Kurose & Keith RossView on AmazonNetworking
- Networking - Overview
- Networking - HTTP
- Networking - TLS
- Networking - LDAP
- Networking - Wi-Fi
- Networking - gRPC
- Networking - BGP
- Networking - DNS
- Networking - Interfaces
- Networking - Network Operating Systems
- Networking - Software Defined Networking
- Networking - FRRouting
- Networking - WebRTC
- Networking - NAT
- Networking - URL
Networking - Versus
