HTTP/2 vs HTTP/3
Comparing HTTP/2 (multiplexed binary streams over TCP) against HTTP/3 (QUIC over UDP eliminating TCP Head-of-Line blocking and cutting setup latency)
Table of Contents
Structure Diagram
Binary stream multiplexing on one TCP conn
- TransportTCP + TLS (2-3 RTT setup)
- HOL BlockingTCP-level HOL blocks all streams on loss
- Header CompressionHPACK (order-dependent)
- Network SwitchDrops connection when client IP changes
Independent streams · 0/1-RTT · Conn migration
- TransportQUIC over UDP (built-in TLS 1.3, 0-1 RTT)
- HOL BlockingPer-stream recovery eliminates HOL blocking
- Header CompressionQPACK (handles out-of-order delivery)
- Network SwitchSeamless migration via Connection ID
What is HTTP/2 vs HTTP/3?
Comparing HTTP/2 (multiplexed binary streams over TCP) against HTTP/3 (QUIC over UDP eliminating TCP Head-of-Line blocking and cutting setup latency). It is a core concept in Networking within CS.
Core Principles
HTTP/2 introduced binary framing, HPACK header compression, and multiplexed streams over a single TCP connection. However, because TCP enforces strict byte ordering, a single lost packet stalls every multiplexed stream—known as TCP Head-of-Line (HOL) blocking.
HTTP/3 replaces TCP with QUIC over UDP, giving each stream independent loss recovery, baked-in TLS 1.3 (1-RTT / 0-RTT), and seamless connection migration across network changes.
Practical Takeaways
- Biggest gains on mobile & lossy links: On clean fiber links HTTP/2 and HTTP/3 perform similarly, but even 1–2% packet loss gives HTTP/3 a dramatic tail-latency edge.
- Graceful fallback for blocked UDP: Some corporate firewalls drop UDP/443; browsers advertise HTTP/3 via
Alt-Svcand fall back cleanly to HTTP/2 over TCP. - Terminate at the edge: Enable HTTP/3 on CDNs or reverse proxies (Cloudflare, CloudFront, Nginx) rather than inside every backend service.
Notable Examples
- High-scale Web & Video: YouTube, Meta, and Cloudflare serving a large share of global traffic over HTTP/3.
- gRPC: Built on HTTP/2 multiplexing for high-performance microservice RPC.