Sweaty Imposter

HTTP/2 Multiplexing

TechniqueNetworking and OSMidSeniorUpdated
Many concurrent streams over a single TCP connection, each with its own flow control. Fixes HTTP 1.1 head-of-line blocking at the HTTP layer but not at TCP.

When to Use HTTP/2 Multiplexing

Browser-facing services serving many small assets, or gRPC backends. One TLS connection per origin instead of 6, which slashes handshake overhead and lets the server prioritize streams.

In Practice

gRPC is built on HTTP/2 streams. A single client connection can carry thousands of in-flight remote procedure calls (RPCs); the server schedules responses as data is ready. Loss of one packet still stalls all streams (TCP head-of-line) which is why HTTP/3 exists.

How HTTP/2 Multiplexing Comes Up in Interviews

Scenario

You are designing a gRPC service that needs thousands of concurrent RPCs per client without opening thousands of TCP connections. Which transport feature do you rely on?

HTTP/2 multiplexes independent streams over one connection with per-stream flow control. gRPC's request, response, and bidirectional streaming map directly onto HTTP/2 streams.

Watch out for TCP head-of-line blocking: one lost packet stalls all streams on that connection. If that bites, run gRPC over HTTP/3 (QUIC) which has independent stream loss recovery.