TCP / UDP
TCP
TCP (Transmission Control Protocol) is a connection-oriented transport layer protocol that ensures reliable data transmission. It establishes a connection using a three-way handshake (SYN, SYN-ACK, ACK) and guarantees that data is delivered in order, without duplication or loss. TCP uses acknowledgments, sequence numbers, flow control, and congestion control mechanisms to manage data flow. It's used in applications where reliability matters, such as HTTP, HTTPS, SSH, and FTP.
UDP
UDP (User Datagram Protocol) is a connectionless transport layer protocol that sends datagrams without establishing a connection. It provides low-latency, best-effort delivery with no guarantee of order or reliability. UDP does not perform retransmissions or acknowledgments, making it faster and more lightweight than TCP. It's used in applications where speed is more important than reliability, such as DNS, VoIP, online gaming, and video streaming.
Last updated