Networking Tutorial · Core Protocols · Lesson 15 of 28
HTTP/1.1, HTTP/2 and HTTP/3
What changed between HTTP versions, why HTTP/2 multiplexes and HTTP/3 runs over QUIC, and what it means for your app.
Comparison
| HTTP/1.1 | HTTP/2 | HTTP/3 | |
|---|---|---|---|
| Published | 1997 (current spec 2022) | 2015 | 2022 |
| Transport | TCP | TCP | QUIC over UDP |
| Format | Text | Binary frames | Binary frames |
| Requests per connection | One at a time | Many, multiplexed | Many, multiplexed |
| Header compression | No | HPACK | QPACK |
| Encryption | Optional | Required by browsers | Always (TLS 1.3 built in) |
Why multiplexing matters
HTTP/1.1 sends one request at a time per connection, so browsers open about six connections per host and queue the rest. HTTP/2 sends many requests in parallel as interleaved streams over one connection.
But HTTP/2 still runs on TCP: one lost packet stalls every stream until it's retransmitted (TCP head-of-line blocking). HTTP/3 uses QUIC, where each stream is delivered independently, and connection setup and TLS happen together in one round trip. QUIC connections also survive a change of network (Wi-Fi to mobile).
import math
rtt_ms, requests = 100, 30
http1 = math.ceil(requests / 6) * rtt_ms # 6 parallel connections, one request each at a time
http2 = rtt_ms # all 30 multiplexed on one connection
print(f"HTTP/1.1 with 6 connections: {http1} ms of request round trips")
print(f"HTTP/2 multiplexed: {http2} ms")
print("(plus connection setup: TCP + TLS 1.3 = 2 RTT for HTTP/1.1 and HTTP/2, 1 RTT for HTTP/3)")
Output
HTTP/1.1 with 6 connections: 500 ms of request round trips HTTP/2 multiplexed: 100 ms (plus connection setup: TCP + TLS 1.3 = 2 RTT for HTTP/1.1 and HTTP/2, 1 RTT for HTTP/3)
What it means for you
- Put HTTP/2 or HTTP/3 on your load balancer or CDN; backends often still speak HTTP/1.1 behind it.
- Old HTTP/1.1 tricks such as domain sharding and sprite sheets are unnecessary with HTTP/2.
- gRPC requires HTTP/2 end to end, so your load balancer must support it.
Test yourself
What problem does HTTP/3 solve that HTTP/2 can't?
TCP head-of-line blocking: one lost packet stalling every streamLack of encryptionSending only one request per connectionText-based headers
Show answer
Answer: TCP head-of-line blocking: one lost packet stalling every stream
HTTP/2 multiplexes over one TCP connection, so a lost packet blocks everything. QUIC delivers each stream independently.