A request is a method, a path, headers and a body The browser asks for GET /app.js with headers such as Host, Accept and Cookie. A POST adds a body. The server answers with a status, headers such as Content-Type and Cache-Control, and a body.
These semantics are defined once (RFC 9110) and shared by every version. HTTP/1.1, HTTP/2 and HTTP/3 only differ in how they put these messages on the wire.
Key idea Changing the HTTP version does not change your API. Methods, headers and status codes stay the same.
HTTP/1.1: plain text, one response at a time per connection HTTP/1.1 sends readable text lines over TCP. Keep-alive reuses the connection for the next request, so the browser does not pay a new handshake for each file.
But on one connection, responses come back strictly in order. A slow response holds up everything behind it. Browsers work around this by opening about six connections per host, each with its own handshake.
Key idea Old tricks such as bundling files and spreading assets over several domains exist only because of this limit.
ALPN picks the version inside the TLS handshake In its TLS ClientHello, the browser lists the protocols it speaks, for example h2 and http/1.1. The server picks one in its reply. This is ALPN (Application-Layer Protocol Negotiation), and it costs no extra round trip.
Browsers only use HTTP/2 over TLS. Cleartext HTTP/2 (h2c) exists, but it is used between services, not by browsers.
Key idea If a proxy in the middle does not offer h2, the client silently falls back to HTTP/1.1. Check which version was actually negotiated.
HTTP/2: many streams share one connection HTTP/2 splits each message into binary frames tagged with a stream ID. Frames from many requests are interleaved on one connection, and the other side reassembles them. A slow response no longer blocks the others at the HTTP level.
Headers are compressed with HPACK, which remembers headers already sent on the connection. Repeated cookies and user agents shrink to a few bytes.
One lost packet still stalls every stream TCP delivers bytes strictly in order. If one packet is lost, TCP holds back everything after it until the retransmission arrives, even frames that belong to other streams.
With HTTP/1.1, only one of six connections stalls. With HTTP/2, the one shared connection stalls. On lossy networks, such as mobile, this can make HTTP/2 no faster or even slower.
Watch out HTTP/2 removed head-of-line blocking from HTTP, not from TCP underneath it.
The server advertises HTTP/3 with Alt-Svc A browser cannot know in advance that a server speaks HTTP/3 on UDP. So the first visit usually uses HTTP/2 over TCP, and the response carries a header such as Alt-Svc: h3=":443"; ma=86400.
The browser remembers this for ma seconds and tries QUIC on the next connection. A DNS HTTPS record can advertise h3 too, so even the first connection can try it.
HTTP/3 runs on QUIC over UDP QUIC is a transport built on UDP with TLS 1.3 inside. The transport and crypto handshakes are combined, so a new connection needs 1 round trip instead of 2. Resuming a known server can send data in the first flight (0-RTT).
Each stream is recovered separately, so a lost packet only delays its own stream. Connections are identified by connection IDs, not by IP and port, so a phone moving from Wi-Fi to LTE can keep the same connection.
Key idea 0-RTT data can be replayed by an attacker. Servers should accept it only for safe, idempotent requests such as GET.
A firewall blocks UDP 443 and the client falls back Many corporate networks allow TCP 443 but drop UDP 443. The QUIC handshake never completes, and after a short wait the browser falls back to HTTP/2 over TCP.
The page still works, just without HTTP/3. This is why servers that offer HTTP/3 always keep the TCP listener as well.
Watch out If HTTP/3 never shows up in DevTools, check the UDP path and the Alt-Svc header first.
gRPC on one HTTP/2 connection lands on one server gRPC runs on HTTP/2 and keeps one long-lived connection open. A layer 4 load balancer picks a backend once per connection. So every call from this client goes to Server 1, and Server 2 sits idle.
In Kubernetes, a plain ClusterIP Service balances per connection too. Spread gRPC calls with a layer 7 proxy that understands HTTP/2 and balances per request (for example Envoy or a service mesh), or with client-side load balancing.
Watch out Adding replicas does not help gRPC traffic if the balancer only sees connections. Watch per-Pod request rates, not just replica count.
Same messages, three transports HTTP/1.1 sends one response at a time per connection and opens several connections. HTTP/2 multiplexes streams on one TCP connection but still stalls on TCP loss. HTTP/3 moves streams onto QUIC over UDP, recovers each stream separately and sets up faster.
The version is negotiated (ALPN) or advertised (Alt-Svc), and clients fall back when a path is blocked. Load balancers must understand the protocol to balance requests rather than connections.
Summary Check the negotiated version with curl -v or the browser DevTools Protocol column before tuning anything.