Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

TCP vs UDP Deep Dive

19. 06. 2025 Updated: 27. 03. 2026 2 min read intermediate

TCP guarantees data delivery in the correct order, while UDP maximizes speed at the cost of potential packet loss. The choice between them is a fundamental architectural decision that affects latency, reliability, and application scalability. Understanding the differences is key to designing network protocols and selecting the right technology.

TCP

  • Three-way handshake — SYN, SYN-ACK, ACK before data transfer begins
  • Guaranteed delivery and ordering — lost packets are automatically retransmitted
  • Flow/congestion control — TCP dynamically adjusts transfer speed
  • Higher latency — overhead from acknowledgments, ordering, and retransmissions

TCP is a stateful protocol — it maintains a connection between client and server. The Nagle algorithm optimizes small packets, the sliding window controls how much data can be sent without acknowledgment. Congestion control algorithms (CUBIC, BBR) ensure fair bandwidth sharing and prevent network congestion.

UDP

  • Connectionless — no handshake, send and hope
  • No guarantees — packets can be lost, duplicated, or arrive out of order
  • Minimal overhead — 8B header compared to 20B+ for TCP
  • Lower latency — no waiting for acknowledgments

UDP is stateless — each datagram is independent. UDP’s simplicity allows applications to implement their own reliability mechanisms tailored to their needs. For example, VoIP tolerates occasional packet loss (brief audio dropout) but cannot tolerate the latency from retransmissions.

When to Use Which

  • TCP — HTTP/HTTPS, SSH, databases, email, file transfer — wherever data completeness matters
  • UDP — DNS lookups, VoIP, video streaming, online games, VPN tunnels — where speed matters

QUIC

HTTP/3 uses QUIC — a protocol built on top of UDP that combines TCP’s reliability with UDP’s low latency. It adds multiplexing (no head-of-line blocking), built-in TLS 1.3 encryption, and 0-RTT connection resumption. QUIC solves a key TCP problem: losing one packet does not block other streams.

TCP for Reliability, UDP for Speed

QUIC is the future — best of both worlds. For new applications, consider QUIC/HTTP3 as the default transport layer.

tcpudpprotokoly
Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.