TCP vs QUIC: Loss Recovery in Modern Web Development

Modern web performance depends heavily on how transport protocols handle lost data packets during transmission. While Transmission Control Protocol (TCP) has anchored internet communication for decades, Quick UDP Internet Connections (QUIC)—the foundation of HTTP/3—redesigns packet recovery from the ground up. This article explores the architectural differences between TCP and QUIC loss recovery mechanisms, detailing how QUIC eliminates head-of-line blocking, resolves retransmission ambiguity, and improves connection resilience for modern web applications.

How TCP Handles Packet Loss

TCP provides a reliable, ordered byte stream over an unreliable network. When data is lost, TCP identifies and retransmits the missing segments using several core mechanisms:

  • Retransmission Timeouts (RTO): If a sender does not receive an acknowledgment (ACK) within a calculated timeframe, it assumes the packet was dropped and retransmits it. RTO calculation relies on smoothed round-trip time (RTT) estimates, which can cause significant latency spikes if packets drop frequently.
  • Fast Retransmit: When an out-of-order packet arrives at the receiver, it generates a duplicate ACK indicating the last in-order byte received. Upon receiving three duplicate ACKs, the sender immediately retransmits the missing segment without waiting for the RTO to expire.
  • Selective Acknowledgments (SACK): Without SACK, TCP can only acknowledge the highest contiguous byte received. SACK allows the receiver to inform the sender about non-contiguous blocks of data that have arrived successfully, reducing unnecessary retransmissions.

Limitations of TCP Loss Recovery

Despite optimizations like SACK, TCP retains inherent architectural bottlenecks:

  1. Retransmission Ambiguity: In standard TCP, retransmitted packets use the exact same sequence numbers as original transmissions. When an ACK returns, the sender cannot reliably determine whether it acknowledges the original transmission or the retransmission, skewing RTT measurements.
  2. Connection-Wide Head-of-Line (HoL) Blocking: Because TCP enforces a single, strictly ordered byte stream, a single lost packet halts the delivery of all subsequent packets in the buffer. When multiple HTTP/2 streams are multiplexed over one TCP connection, a drop affecting Stream A stalls Streams B and C as well.

How QUIC Redesigns Loss Recovery

QUIC operates in user space over UDP, allowing it to bypass operating system kernel updates and introduce modernized transport-layer logic.

1. Monotonically Increasing Packet Numbers

Unlike TCP sequence numbers, which represent byte offsets, every QUIC packet carries a unique, strictly increasing packet number. If packet 10 drops and its payload must be resent, the retransmitted data is packaged into a new packet with a higher number (e.g., packet 15). This design completely eliminates retransmission ambiguity, enabling precise RTT calculations even during heavy packet loss.

2. Stream Multiplexing Without Head-of-Line Blocking

QUIC separates the transport layer from individual data streams. Packet loss is isolated to the specific stream carrying the dropped frame. If a packet containing data for Stream A is lost, only Stream A pauses to await recovery; other concurrent streams continue processing incoming data without interruption.

3. Richer ACK Frames and Explicit Delay Tracking

QUIC ACK frames support up to 256 ACK ranges, providing a far more detailed view of received and missing packets than TCP’s SACK option (which is limited to three or four blocks due to TCP header size constraints). Additionally, QUIC receivers measure and report the exact delay between receiving a packet and sending the corresponding ACK, allowing senders to separate network latency from endpoint processing delays.

4. Probe Timeout (PTO) Instead of Tail Loss Probes and RTO

QUIC replaces TCP's separate RTO and Tail Loss Probe mechanisms with a unified Probe Timeout (PTO). When a timer expires, QUIC sends a probe containing new or unacknowledged data to solicit an immediate ACK. This approach prevents stalls at the tail end of transmissions and keeps RTT measurements accurate.

Summary of Differences

Feature TCP QUIC
Underlying Protocol Native IP transport UDP (User space)
Packet Identification Byte sequence offsets Monotonically increasing packet numbers
Retransmission Ambiguity Present (requires heuristics) Eliminated entirely
Head-of-Line Blocking Affects entire connection Isolated to individual streams
ACK Capabilities SACK (typically 3–4 blocks) Up to 256 ACK ranges
Timeout Mechanism RTO with exponential backoff Probe Timeout (PTO)

Impact on Web Development

For web developers, QUIC's loss recovery mechanisms provide tangible benefits for end-user experience:

  • Mobile and Lossy Networks: Mobile devices switching between cell towers or users on congested Wi-Fi experience frequent burst loss. QUIC recovers from these interruptions faster and without freezing unrelated application processes.
  • Faster Tail Latency: The combination of PTO, precise RTT calculations, and unambiguous ACKs reduces the 95th and 99th percentile latencies of web applications, directly improving Core Web Vitals such as Largest Contentful Paint (LCP) and Interaction to Next Paint (INP).