Join our Newsletter — 33% off our NHI Course

TCP and UDP

TCP and UDP are the two main transport protocols that move data between networked systems. TCP provides connection-oriented delivery with sequencing, acknowledgements, and retransmission for reliability. UDP sends packets without establishing a session, reducing overhead and latency, which suits real-time traffic, streaming, and simple request flows.

How TCP and UDP differ in transport behavior

TCP and UDP solve the same transport-layer job in different ways. TCP adds state, sequencing, acknowledgements, and retransmission so applications can depend on ordered delivery; UDP avoids that overhead so packets can move with less delay and less protocol machinery.

That design difference is why TCP is usually chosen for transactions that need completeness and correctness, while UDP is chosen when timeliness matters more than guaranteed delivery. In practice, the protocol choice shapes how applications tolerate loss, latency, duplication, and reordering.

Where TCP fits and where UDP fits best

TCP is generally the better fit for request-response systems, file transfer, login flows, and most business applications where missing data would create errors or retry logic would be costly. Its connection setup and delivery guarantees make it easier for application owners to reason about success, but those same features add latency and state handling.

UDP is better suited to voice, video, gaming, telemetry, DNS-style lookups, and other traffic that can absorb a small amount of loss without failing the whole exchange. Because UDP does not wait to establish a session, it can reduce latency and avoid per-connection overhead, which is often more important than perfect delivery.

Security and operational implications of protocol choice

Protocol selection affects more than performance. TCP state can be targeted by resource exhaustion, connection tracking pressure, or abuse of long-lived sessions, while UDP’s statelessness can make spoofing, reflection, and amplification abuse easier if the service is exposed without controls.

Architectural choices around transport also influence logging, rate limiting, and inspection. TCP traffic is often easier to correlate with sessions and application exchanges, while UDP workloads may require different detection logic because the network does not provide the same built-in conversation structure.

How to think about TCP and UDP in modern networks

The useful question is not which protocol is “better,” but what failure mode the application can tolerate. TCP favors correctness and predictability; UDP favors low overhead and low delay. Many modern services use both, with TCP for control or transactional paths and UDP for latency-sensitive data paths.

That makes protocol review a design decision as much as a networking one. Teams should understand whether an application depends on ordered delivery, retransmission, session continuity, or minimal delay before they standardize on one transport or permit both.

Risk and Threat Considerations

Transport protocols create different exposure profiles. TCP can be stressed by connection buildup, session exhaustion, and retry-driven load, while UDP can be abused for reflection, amplification, or traffic spoofing when services are reachable from untrusted networks.

Failure mechanism: Attackers or misconfigured clients exploit the protocol’s native behavior, such as TCP state maintenance or UDP’s lack of session verification, to increase load, hide origin, or degrade service.

Impact: The result can be latency, dropped traffic, degraded availability, and weaker visibility into who originated the traffic or how the exchange unfolded.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST CSF 2.0 PR.AA-05 — Authenticating Identities and Devices Transport sessions often carry authenticated networked services and users.
Recommendation — Align transport rules with authenticated service paths and restrict exposure to approved endpoints.
NIST SP 800-53 Rev 5 SC-5 — Denial of Service Protection TCP and UDP both have protocol-specific DoS exposure patterns.
AC-4 — Information Flow Enforcement Protocol selection affects which flows are permitted and how they are constrained.
Recommendation — Apply SC-5 to limit transport-layer exhaustion and reflection-driven service disruption. Use AC-4 to enforce protocol-specific network flow restrictions and segmentation.
CIS Controls v8 CIS-12 — Network Infrastructure Management Managing TCP and UDP exposure is part of secure network control and hardening.
CIS-13 — Network Monitoring and Defense Transport behavior affects monitoring, filtering, and abuse detection.
Recommendation — Harden network services by restricting unnecessary TCP and UDP listeners and exposures. Tune monitoring to detect abnormal TCP session patterns and UDP abuse indicators.

Practitioner Guidance

Why practitioners should care: Treat transport choice as part of the security and reliability design, not just an implementation detail. The protocol you allow can change how the service fails, how it is monitored, and what abuse patterns it must withstand.

What to watch for: Review whether the application truly needs TCP’s delivery guarantees or UDP’s lower latency, then validate that firewalls, load balancers, rate limits, and detection rules match the protocol’s behavior rather than assuming one set of controls fits both.