HTTP/2
A version of HTTP that sends the same methods, statuses and headers in a binary format and runs many requests at once over one connection.
In more detail
HTTP/2 splits each message into binary frames and multiplexes many exchanges on one TCP connection, so one slow response no longer blocks the others at the HTTP level. Headers are also compressed. The meaning of requests is unchanged, so API design carries over; gRPC is built on HTTP/2.
Related terms
- HTTP/1.1 — The text-based version of HTTP in which one connection carries one request and response at a time.
- HTTP/3 — The newest version of HTTP, which keeps the meaning of HTTP/2 but runs over QUIC on UDP instead of TCP.
- multiplexing — Carrying many independent conversations over one connection at the same time by interleaving their pieces.
- framing — The rule that marks where one message or record ends and the next begins in a stream of bytes.
- gRPC — A high-performance remote procedure call framework that generates client and server code from Protocol Buffers definitions and runs over HTTP/2.
- frame — A self-contained unit of data in a protocol such as HTTP/2 or WebSocket, with a small header giving its type and length.
- HPACK — The header compression format of HTTP/2, which avoids resending headers that are the same on every request.
Taught in
- What An API Is, And The Alternatives — Modern API Architecture: REST, GraphQL & gRPC
- When Each Wins: REST, GraphQL, gRPC And SOAP — Modern API Architecture: REST, GraphQL & gRPC
- Native HTTP/2 Protocols: Multiplexed Streams & Push — Node.js Internals & Backend Services