HTTP/2 added multiplexing, HTTP/3 brings QUIC over UDP for lower latency.
HTTP/2¶
- Multiplexing — multiple requests over a single TCP connection
- Header compression (HPACK)
- Server Push
- Binary protocol
server { listen 443 ssl http2; } curl -I –http2 https://example.com
HTTP/3¶
- QUIC — UDP instead of TCP
- 0-RTT reconnect
- No head-of-line blocking
- TLS 1.3 built-in
server { listen 443 quic reuseport; listen 443 ssl http2; add_header Alt-Svc ‘h3=”:443”’; }
When to Use¶
- HTTP/2 — deploy now, supported everywhere
- HTTP/3 — mobile users, global audience
HTTP/2 Today, HTTP/3 Tomorrow¶
HTTP/2 is a must-have. HTTP/3 for mobile networks.
http/2http/3quic