- Asked 3/11
- 2073 Chaitra
- 2071 Shrawan · 3 marks
- 2071 Chaitra · 5 marks
Differences between TCP and UDP
Distinguish between TCP and UDP.
TCP (Transmission Control Protocol) is a connection-oriented, reliable transport protocol. UDP (User Datagram Protocol) is a connectionless, unreliable, lightweight transport protocol.
| Point | TCP | UDP |
|---|---|---|
| Connection | Connection-oriented (3-way handshake) | Connectionless |
| Reliability | Reliable: ACK, retransmission, sequencing | Unreliable, best effort |
| Data unit | Byte stream, segments | Message (datagram) with boundaries kept |
| Ordering | Ordered delivery, duplicates removed | No ordering |
| Flow / congestion control | Yes (window, slow start) | No |
| Header size | 20 to 60 bytes | 8 bytes |
| Speed / overhead | Slower, higher overhead | Faster, low overhead |
| Transfer | Point to point only | Supports broadcast and multicast |
| Applications | HTTP, FTP, SMTP, SSH, POP3 | DNS, DHCP, SNMP, VoIP, video streaming, TFTP |
TCP is chosen when correctness matters; UDP when speed and low delay matter more than occasional loss.
✓ Answer checked by Claude Opus 5.5 (high effort)