What HTTP/2 frames are
HTTP/2 replaces the text protocol of HTTP/1.1 with a binary framing layer. Every exchange is a stream of typed frames multiplexed over one TCP connection. Each frame begins with a fixed 9-byte header — a 24-bit length, an 8-bit type, an 8-bit flags field and a 31-bit stream identifier — followed by a type-specific payload. This reference lists all ten frame types from RFC 9113 with their type code, flags and scope.
How it works
The frame header tells the receiver how to interpret the payload:
+-----------------------------------------------+
| Length (24) |
+---------------+---------------+---------------+
| Type (8) | Flags (8) |
+-+-------------+---------------+-------------------------------+
|R| Stream Identifier (31) |
+=+=============================================================+
| Frame Payload (length octets) ...
+---------------------------------------------------------------+
Stream id 0 means the frame applies to the whole connection (SETTINGS, PING,
GOAWAY). A non-zero id ties the frame to a single request/response stream. Flags
like END_STREAM and END_HEADERS mark boundaries; ACK acknowledges SETTINGS
and PING.
Tips and notes
- A new request is a HEADERS frame (optionally with CONTINUATION) opening a fresh, odd-numbered, client-initiated stream id.
- SETTINGS must be ACKed; never assume a setting is active until the peer’s ACK arrives.
- WINDOW_UPDATE drives flow control — a stalled stream usually means an exhausted flow window.
- GOAWAY carries the last processed stream id so the client knows which requests to safely retry on a new connection.