gRPC-Web Fundamentals: Browser Constraints and Proxy Model
Learn the interview-ready mental model, practical trade-offs, and production patterns for this web fundamentals topic.
Topic content
gRPC-Web is a browser-compatible version of gRPC that uses a proxy (usually Envoy) to translate between browser-friendly transport and native gRPC. It brings protobuf contracts and type safety to frontend clients but introduces a new infrastructure layer.
Native gRPC is like speaking directly with the chef in their language. Browsers can't do that. gRPC-Web adds a translator (proxy) who converts your order into the chef's language and brings back the food. You get the benefits of the chef's expertise, but you now have an extra person (and potential point of failure) in the chain.
1Native gRPC vs gRPC-Web
Native gRPC uses full HTTP/2 features. Browsers cannot open native gRPC channels, so gRPC-Web adds a proxy layer for translation.
2Browser Constraints
Browsers limit low-level networking. gRPC-Web works around this by using standard fetch/XHR + a proxy that handles protocol translation.
3Proxy and Transcoding Model
The proxy (e.g. Envoy) converts gRPC-Web requests to native gRPC and back. This adds latency, observability complexity, and another failure domain.
4Protobuf Contracts & Streaming Tradeoffs
Strong schema-first contracts with code generation. Streaming support is limited compared to native gRPC.
- ✓gRPC-Web enables browser clients to use gRPC backends via a proxy
- ✓Browsers cannot open native gRPC channels
- ✓Proxy adds latency, observability, and failure surface
- ✓Strong protobuf contracts are a major benefit
- ✓Streaming support is more limited than native gRPC
- ✓Adoption should be driven by backend alignment
- ✓Operational complexity is a key consideration