COMPUTER NETWORKS · 13 MIN READ

TCP, UDP, and application protocols

TCP and UDP offer different transport services; application protocols choose based on the communication they need.

Learning objectives

  • Compare TCP’s ordered byte stream with UDP datagrams.
  • Identify HTTP and DNS as application-layer protocols.

Choose a service, not a slogan

TCP provides a reliable, ordered byte-stream service between endpoints when a connection can be established. UDP provides a datagram service with less transport-level machinery and no built-in guarantee of delivery, ordering, or duplicate suppression. Neither is “always faster” in every application; the application’s latency, loss, ordering, and congestion requirements matter.

Application protocols

HTTP defines request/response semantics for web communication. DNS provides a naming system that maps names to records such as addresses. Both typically rely on lower layers but solve different application questions.

Common mistakes and references

  • TCP is a byte stream, not a message boundary service; an application must frame messages.
  • UDP does not remove the need to handle loss or ordering if an application requires them.