Urgent.News

What's breaking now, across thousands of outlets.

Tech

How HTTP/3 and QUIC Actually Work: UDP, Streams, and Why 0-RTT Changes Everything

How HTTP/3 and QUIC Actually Work: UDP, Streams, and Why 0-RTT Changes Everything You type https://example.com and hit Enter. Your browser opens a connection, negotiates TLS, sends an HTTP request, gets a response. That's the mental model most developers carry. It's incomplete. Since 2022, there's a real chance that connection isn't TCP at all — it's QUIC. And QUIC doesn't just swap TCP for UDP.…

How HTTP/3 and QUIC Work: UDP, Streams, and 0-RTT's Impact

When you enter a URL like https://example.com, your browser initiates a connection, negotiates Transport Layer Security (TLS), sends an HTTP request, and receives a response. While this process seems straightforward, it relies on Transmission Control Protocol (TCP). However, since 2022, QUIC may replace TCP in this scenario. QUIC doesn't merely swap TCP for UDP; it fundamentally alters how transport, security, and application semantics interact at the packet level.

This article explains the full process of your browser speaking HTTP/3, from the wire format up to the stream multiplexing that eliminates head-of-line blocking.

Layer Comparison

HTTP/2 was built on top of TCP and TLS. In contrast, HTTP/3 operates over QUIC running over UDP. Here's the breakdown:

- TCP provides a reliable, ordered byte stream.

- QUIC operates over UDP, providing the same reliability but at the stream level.

- TLS 1.3 is layered over TCP for HTTP/2 and integrated within QUIC for HTTP/3.

- Multiplexing in HTTP/2 uses a single TCP stream for all HTTP/2 frames. QUIC introduces independent, native streams for each application data flow.

- QUIC's handshake takes only 1 round trip time (RTT) or 0 RTT with session resumption, compared to 2–3 RTT in TCP+TLS.

Key QUIC Advancements

QUIC significantly improves upon TCP and HTTP/2 by moving reliability and ordering from the connection level to the stream level. This means that a lost packet in one stream does not stall other streams. The wire format of QUIC involves packets containing frames, which are then encapsulated within UDP datagrams. QUIC's encryption levels encompass four categories: Initial, Long Initial, 0-RTT, and 1-RTT. Each packet type accommodates different frames, enhancing security and functionality.

Stream Multiplexing

HTTP/2 multiplexes multiple streams over one TCP connection. QUIC, however, natively supports multiple streams within each packet. This allows for multiple frames to be sent concurrently, reducing latency and improving efficiency. Coalescing, where multiple QUIC packets are grouped into a single UDP datagram, is distinct from multiplexing and facilitates seamless data flow between streams.

Connection Management

QUIC replaces TCP's 4-tuple for connection identification with Connection IDs. These IDs remain constant even if IP addresses or ports change, ensuring stable and secure connections. QUIC includes several key frames like NEW_CONNECTION_ID, RETIRE_CONNECTION_ID, PATH_CHALLENGE, and PATH_RESPONSE, which are critical for connection migration and validation, ensuring data integrity during transitions.

Handshake Process

The QUIC handshake is streamlined compared to traditional TCP+TLS. In a new session, the handshake occurs within a single RTT. For resumed sessions, 0-RTT is possible if the client possesses a session ticket, enabling data transmission before the server's full response. This efficiency is achieved by integrating TLS within QUIC, eliminating the need for a separate handshake.

Conclusion

QUIC represents a substantial evolution in network communication, offering faster, more efficient, and more secure data transfer through its innovative use of UDP, stream-based multiplexing, and optimized handshake processes. By understanding these mechanisms, developers can better appreciate the improvements brought by HTTP/3 and QUIC over their predecessors.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

ElevenLabs free plan: 10,000 credits is about ten minutes of audio

Ten thousand credits sounds like a lot until you convert it: about ten minutes of finished speech a month. What the free plan includes Item Free plan Monthly credits 10,000 Roughly 10 minutes of…

  • ElevenLabs free plan offers 10,000 credits
  • Credits equate to about 10 minutes of audio per month
  • Commercial license required for monetized use

More from Monday 2 November →