Skip to content

HTTP/1.1 vs HTTP/2 vs HTTP/3

HTTP/1.1 (1997)

  • One request at a time per connection.
  • Must wait for response before sending next request.
  • Persistent connections — reuses TCP connection (keep-alive) but still sequential.
  • Head of Line Blocking (HOL) — one slow request blocks everything behind it.
Request 1 --> wait --> Response 1
Request 2 --> wait --> Response 2  ← can't send until R1 done
Request 3 --> wait --> Response 3  ← can't send until R2 done

Pipelining (attempted fix)

  • Send multiple requests without waiting for responses.
  • But responses must come back in order — still HOL blocking.
  • Rarely used in practice — many servers/proxies don't support it properly.

Problems with HTTP/1.1

  • Verbose text-based headers (repeated every request).
  • No compression of headers.
  • HOL blocking.
  • Multiple TCP connections = resource waste.

Workarounds Developers Used

  • Multiple TCP connections (browsers open 6 per domain)
  • Domain sharding — split resources across subdomains
  • Bundling/minification — reduce number of requests
  • Spriting — combine images into one

HTTP/2 (2015)

  • Binary Protocol — HTTP/1.1 is text-based → verbose, slower to parse. HTTP/2 is binary → compact, faster to parse.
  • Multiplexing ★ — Multiple requests/responses simultaneously over one TCP connection. No HOL blocking at application layer. Each message split into frames sent interleaved.
  • Header Compression (HPACK) — Headers compressed using HPACK. Repeated headers (like cookies) sent only once. Significant bandwidth savings.
  • Server Push — Server can proactively send resources client hasn't requested yet. E.g. client requests index.html → server also pushes style.css and app.js.
  • Stream Prioritization — Assign priority to streams. Critical resources (CSS, JS) loaded before images.

HTTP/2 Multiplexing

Stream 1: --> Request A --> Response A
Stream 2: --> Request B --> Response B   ← all at same time!
Stream 3: --> Request C --> Response C

HTTP/2 Still Uses TCP — Problem

  • HTTP/2 solved application-layer HOL blocking.
  • But TCP itself has transport-layer HOL blocking.
  • One lost packet → entire TCP connection stalls waiting for retransmission.
Packet lost --> TCP waits --> ALL streams stall

HTTP/3 (2022)

  • Built on QUIC instead of TCP. HTTP/3 runs over QUIC (not TCP). QUIC runs over UDP.

What Is QUIC?

  • Developed by Google.
  • UDP-based transport protocol.
  • Implements reliability, ordering, congestion control itself.
  • Built-in TLS 1.3 encryption.

HTTP/3 Key Improvements

1. No HOL Blocking ★

  • QUIC handles streams independently.
  • Lost packet only affects that stream, not others.

2. Faster Connection Setup

  • HTTP/1.1/2 over TLS: TCP handshake (1 RTT) + TLS handshake (1-2 RTT) = 2-3 RTT
  • HTTP/3 over QUIC: combines transport + crypto = 1 RTT (or 0-RTT for repeat visits)

3. Connection Migration

  • TCP connections tied to IP + Port. Switch networks (WiFi → 4G) → connection breaks.
  • QUIC uses Connection ID — not tied to IP/Port. Switch network → connection continues.

4. Built-in Encryption

  • TLS 1.3 is mandatory in QUIC. HTTP/3 is always encrypted.
HTTP/2 (TCP):   Packet lost → ALL streams stall ✗
HTTP/3 (QUIC):  Packet lost → only that stream affected ✓

HTTP/2: Switch network → connection dies → reconnect ✗
HTTP/3: Switch network → connection continues ✓

Side by Side Comparison

FeatureHTTP/1.1HTTP/2HTTP/3
Year199720152022
ProtocolTCPTCPQUIC (UDP)
FormatTextBinaryBinary
MultiplexingNoYesYes
HOL BlockingApp + TransportTransport onlyNone
Header CompressionNoHPACKQPACK
Server PushNoYesYes
Connection Setup2-3 RTT2-3 RTT1 RTT / 0-RTT
EncryptionOptionalOptionalMandatory
Connection MigrationNoNoYes

HOL Blocking Evolution

HTTP/1.1: [R1]--[R2]--[R3]  sequential, fully blocked

HTTP/2:   [R1] -------------->  multiplexed BUT
          [R2] -------------->  one TCP packet loss
          [R3] -------------->  stalls ALL streams

HTTP/3:   [R1] -------------->  truly independent
          [R2] -------------->  one packet loss
          [R3] -------------->  only affects that stream

Quick Analogy

VersionAnalogy
HTTP/1.1Single checkout lane — one customer at a time
HTTP/2Multiple lanes but same road — if road blocks, all lanes stop
HTTP/3Multiple independent roads — one blocked road doesn't affect others