How gRPC Uses HTTP/2 and Transitions to HTTP/3

This article explores how the gRPC framework leverages the core features of HTTP/2 over TCP for high-performance communication, examines the network-level limitations inherent to this architecture, and explains how gRPC is adapting to HTTP/3 over QUIC (UDP) to achieve lower latency, zero-head-of-line blocking, and resilient connection migration.

How gRPC Uses HTTP/2 (over TCP)

gRPC is designed around the capabilities of HTTP/2, using it as its primary transport layer to provide efficient, low-overhead Remote Procedure Calls (RPCs).

Limitations of HTTP/2 over TCP

While HTTP/2 is a substantial improvement over HTTP/1.1, running over TCP introduces bottlenecks in modern, distributed networks:

How gRPC Transitions to HTTP/3 (over UDP)

HTTP/3 replaces TCP with QUIC, an encrypted transport protocol implemented on top of UDP in user space. Transitioning gRPC to HTTP/3 addresses the architectural bottlenecks of HTTP/2 while preserving gRPC’s high-level semantics.

+-----------------------------------+       +-----------------------------------+
|               gRPC                |       |               gRPC                |
+-----------------------------------+       +-----------------------------------+
|              HTTP/2               |  -->  |              HTTP/3               |
+-----------------------------------+       +-----------------------------------+
|             TLS 1.2/1.3           |       |           QUIC (Crypto)           |
+-----------------------------------+       +-----------------------------------+
|                TCP                |       |                UDP                |
+-----------------------------------+       +-----------------------------------+

Key Architectural Improvements

Implementation and Semantic Compatibility

Because HTTP/3 retains the core abstractions of HTTP/2—specifically streams, frames, headers, and trailers—gRPC’s application programming interface (API) and core behaviors remain identical.

To run over HTTP/3: 1. Transport Layer Substitution: gRPC core libraries integrate QUIC transport implementations (such as quiche, msquic, or Cronet) beneath the gRPC wire protocol layer. 2. Framing Mapping: gRPC maps its protobuf payloads directly into HTTP/3 DATA frames and continues to communicate RPC termination and status via HTTP/3 trailing headers. 3. Transport Discovery: Clients discover HTTP/3 capabilities on the server using the Alt-Svc (Alternative Services) header or DNS HTTPS resource records, enabling a fallback to HTTP/2 if UDP/QUIC traffic is filtered or blocked by intermediate firewalls.