HTTP Fundamentals

HTTP/2 vs HTTP/3: What Changed and Why

A comparison of HTTP/1.1, HTTP/2, and HTTP/3 — multiplexing, header compression, QUIC transport, and real-world performance differences.

The Evolution of HTTP

HTTP/1.1 served the web for 15+ years but has fundamental limitations. HTTP/2 and HTTP/3 solve these problems in different ways.

HTTP/1.1 — The Baseline

  • One request per connection at a time (head-of-line blocking)
  • Workaround: browsers open 6-8 parallel TCP connections per domain
  • Headers are plain text and repetitive (no compression)
  • Domain sharding and sprite sheets were necessary optimizations

HTTP/2 — Multiplexing over TCP

Released in 2015, HTTP/2 introduced:

Binary Framing

Messages are split into binary frames instead of text. More efficient to parse.

Multiplexing

Multiple requests and responses share a single TCP connection. No more head-of-line blocking at the HTTP layer. A slow response doesn't block other requests.

Header Compression (HPACK)

Headers are compressed using a shared dictionary. Repeated headers (like cookies) are sent once and referenced by index.

Server Push

The server can proactively send resources the client hasn't requested yet. In practice, this feature was rarely used effectively and is being deprecated.

HTTP/2 Limitation

HTTP/2 still runs on TCP. If a TCP packet is lost, all streams on that connection stall (TCP-level head-of-line blocking). This is especially painful on lossy mobile networks.

HTTP/3 — QUIC Transport

Released in 2022, HTTP/3 replaces TCP with QUIC:

QUIC (UDP-based)

  • Built on UDP instead of TCP
  • Each stream is independently flow-controlled
  • Packet loss on one stream doesn't affect others (solves TCP HOL blocking)

0-RTT Connection Setup

QUIC integrates TLS 1.3 into the transport layer. New connections need just 1 RTT (vs 2-3 for TCP+TLS). Resumed connections can send data in 0 RTT.

Connection Migration

QUIC connections survive network changes (WiFi to cellular) because they're identified by connection ID, not IP:port tuples.

Comparison Table

FeatureHTTP/1.1HTTP/2HTTP/3
TransportTCPTCPQUIC (UDP)
MultiplexingNoYesYes
HOL BlockingHTTP + TCPTCP onlyNone
Header CompressionNoneHPACKQPACK
Connection Setup2-3 RTT2-3 RTT1 RTT (0-RTT resume)
Connection MigrationNoNoYes

Should You Upgrade?

  • HTTP/2 — Yes, unconditionally. Supported everywhere, drop-in improvement.
  • HTTP/3 — Enable if your CDN/server supports it. Biggest gains on mobile and lossy networks. Cloudflare, Google Cloud, and AWS CloudFront all support HTTP/3.

البروتوكولات ذات الصلة

مصطلحات ذات صلة

المزيد في HTTP Fundamentals