Networking

TCP vs UDP

TCP vs UDP explained: how TCP's handshake, acknowledgements and resending make delivery reliable, why UDP skips them for speed, and when to use each one.

  • 6 min read
  • 5 questions
  • +35 XP
Transcript

TCP vs UDP, explained by cats. Kitty wants to send tuna to another cat. When using TCP, she’s careful. She wraps the tuna nicely. Labels it. Sends it. Waits for the other cat to confirm it arrived. If something’s missing, she resends it.

Perfect delivery, but slower. When using UDP, Kitty’s fast. No waiting. No confirmation. She just throws tuna across the Most of it lands fine. Some doesn’t. But who cares, it’s faster. TCP is for when every bite matters. Emails. Files.

Web pages. UDP is for when speed matters more. Games. Streams. Voice chat. So: Using TCP means, reliable tuna delivery. And using UDP means, fast tuna throwing. Both send data. Just very different cat energy.