// simulator
TCP vs UDP Simulator
Interactive visualization showing the differences between TCP's reliable connection-oriented protocol and UDP's fast connectionless approach. See the 3-way handshake, packet loss, and retransmissions in action.
Protocol Simulator
Visualize the 3-Way Handshake and Reliability mechanisms.
TCP Concept: Idle
(Sender)
(Receiver)
Ready to simulate
Simulation Control
Network Conditions
Experiment by increasing "Packet Loss" to see how TCP retries vs UDP just loses data.
Space play/pause · M toggle mode · R reset
Understanding TCP vs UDP
TCP (Transmission Control Protocol)
- Connection-oriented with 3-way handshake
- Guaranteed delivery and ordering
- Automatic retransmission of lost packets
- Flow control and congestion management
- Higher overhead but reliable
- Best for: HTTP, FTP, email, file transfers
UDP (User Datagram Protocol)
- Connectionless. No handshake required.
- No delivery or ordering guarantees
- No retransmission. Fire and forget.
- Minimal overhead, very fast
- Lower latency, higher throughput
- Best for: Streaming, gaming, VoIP, DNS
When to use each protocol
- Use TCP when data integrity is critical (banking, file downloads, web pages).
- Use UDP when speed matters more than reliability (live video, multiplayer games).
- Some apps use both: DNS queries over UDP, zone transfers over TCP.
- Modern protocols like QUIC combine benefits of both (HTTP/3).
Try next
// simulator
DNS Resolution Simulator
Learn how DNS works with an interactive step-by-step simulator. Visualize the DNS hierarchy, understand caching at different levels, and see the difference between recursive and iterative queries.
// simulator
Network Packet Journey
Follow a single HTTP/HTTPS packet through the entire network stack with stunning animations. Learn DNS, TCP, TLS, CDN, load balancing, and more!
// simulator
Fork Bomb Simulator
Visualize how the infamous :(){ :|:& };: fork bomb works. Watch processes multiply exponentially, exhaust system resources, and learn how to protect against it with ulimit, cgroups, and systemd.