gRPC bridge — gRPC for HTTP/1.1 clients
Let HTTP/1.1-only clients call a gRPC backend without supporting HTTP/2.
The fourth gRPC translator
You've now met three gRPC-related Envoy filters:
| Filter | Purpose |
|---|---|
grpc_web | Browsers that can't read HTTP/2 trailers (Lesson 17) |
grpc_json_transcoder | REST/JSON callers that don't speak gRPC at all (Lesson 18) |
grpc_stats | Observability only — emit per-method gRPC counters |
grpc_http1_bridge | Native gRPC clients stuck on HTTP/1.1 ← this lesson |
envoy.filters.http.grpc_http1_bridge lets clients that can't speak
HTTP/2 still call a real gRPC backend. The client sends a normal
HTTP/1.1 POST with Content-Type: application/grpc (or
application/x-protobuf if upgrade_protobuf_to_grpc: true); Envoy
buffers the upstream HTTP/2 response, reads the grpc-status trailer,
and re-emits it as a response header alongside HTTP 200 (or 503 if
the gRPC call failed).
Minimal envoy.yaml
http_filters:
- name: envoy.filters.http.grpc_http1_bridge
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.grpc_http1_bridge.v3.Config
upgrade_protobuf_to_grpc: true
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
clusters:
- name: grpc_backend
type: STRICT_DNS
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
explicit_http_config: { http2_protocol_options: {} } # MANDATORY
load_assignment:
cluster_name: grpc_backend
endpoints:
- lb_endpoints:
- endpoint: { address: { socket_address: { address: orders-grpc, port_value: 50051 }}}
Three pitfalls
Without http2_protocol_options on the cluster, Envoy
speaks HTTP/1.1 to the gRPC server, which rejects with 426 / connection
close. This is the same trap as Lesson 17 (gRPC routing) — and it bites
extra hard here because the symptoms look like a bridge bug.
The bridge buffers the entire response to read trailers, so
server-streaming and bidi-streaming RPCs do not work. Only unary calls.
For streaming-from-browser use grpc_web instead.
Clients must read grpc-status and grpc-message
from response headers. If your custom HTTP/1 client looks for
trailers it'll always see "OK" and miss real failures.
Compared to its cousins
| Client speaks… | Server speaks… | Use filter |
|---|---|---|
| HTTP/2 + gRPC | HTTP/2 + gRPC | (none — pass-through) |
| HTTP/1.1 + gRPC framing | HTTP/2 + gRPC | grpc_http1_bridge |
| HTTP/1.1 + gRPC-Web (browser) | HTTP/2 + gRPC | grpc_web |
| HTTP/1.1 + JSON | HTTP/2 + gRPC | grpc_json_transcoder |
Hands-on: a vanilla curl gRPC call
-
Run any gRPC server (the bookstore sample from Lesson 18 works) on
localhost:50051. -
Configure Envoy with the snippet above. Run on
localhost:10000. -
Build a binary protobuf request body for a unary RPC. The exact structure is method-specific; use
protoc --encodeor the gRPC reflection API. Save it asreq.bin. -
Call through with curl (HTTP/1.1, no special tooling):
curl -i -X POST http://localhost:10000/orders.OrderService/Create \
-H 'Content-Type: application/x-protobuf' \
--data-binary @req.bin
- The response will look like:
HTTP/1.1 200 OK
content-type: application/grpc
grpc-status: 0
grpc-message:
The body is the binary protobuf response. The grpc-status
header is the gRPC outcome.
-
Force an error on the server side (
return status.Error(codes.NotFound, "x")) and confirm you get HTTP200withgrpc-status: 5, OR — depending on the bridge config — HTTP503. -
Try a server-streaming RPC and observe the bridge hangs or errors — that's expected. Switch to
grpc_webfilter if you need streaming to browsers.
grpc_http1_bridge lets the mainframe POST application/x-protobuf payloads to /orders.OrderService/Create. The new gRPC backend gets a clean HTTP/2 call. No code changes on either side. The bridge is the cheapest possible adapter — and it ships with upstream Envoy.Module 8 in one breath
| Lesson | What you can now do |
|---|---|
| TCP proxy | Forward any binary protocol with L4 routing |
| SQL proxies | Free per-statement metrics for MySQL / Postgres |
| Redis proxy | Run Redis Cluster behind a single dumb endpoint |
| WebSockets + SSE | Long-lived connections through Envoy without timeout traps |
| HTTP/3 + QUIC | Production HTTP/3 server + raw UDP forwarding |
| gRPC bridge | gRPC for clients that never learned HTTP/2 |
Combined with Modules 1-7, Envoy is now the most versatile network proxy you have. Every protocol your apps speak, Envoy can sit in front of — with the same observability, auth, and policy story you already know.
Which Envoy filter lets a legacy HTTP/1.1 client (no HTTP/2 support) call a native gRPC backend?