What is HTTP/2
HTTP/2 is a major revision of the HTTP protocol, standardized in 2015. It solves the performance limitations of HTTP/1.1 by multiplexing multiple requests over a single TCP connection, compressing headers, and supporting binary framing.
How it works
In HTTP/1.1, each request occupies the connection until the response arrives — head-of-line blocking. Browsers work around this by opening 6-8 TCP connections per domain. HTTP/2 introduces streams: each request/response pair gets its own stream ID, and frames from different streams are interleaved on a single connection. A single TCP connection handles hundreds of concurrent requests.
HPACK header compression maintains a shared dictionary of common headers. After the first request sends Content-Type: application/json, subsequent requests reference it by index — a few bytes instead of the full string.
Why it matters
HTTP/2 is the transport layer for gRPC. Multiplexing allows many concurrent RPCs on one connection. Header compression reduces overhead for repetitive headers. Flow control prevents fast senders from overwhelming slow receivers. These features make HTTP/2 ideal for service-to-service communication where many small messages flow between endpoints.
See How gRPC Works for how gRPC leverages HTTP/2 streams for its four communication patterns.