If the browser supports http/2, why does grpc-web
require envoy
proxy?
Is it just required for older browsers that do not support http/2?
The gRPC-Web protocol was designed to be usable from a browser, but be easily translatable into native gRPC calls. The most common deployment model of gRPC-Web is to use a proxy such as Envoy to translate between the gRPC-Web frontend and a native gRPC back-end.
Envoy is one of very few HTTP proxies that correctly supports trailers and is thus one of the few proxies that can transport gRPC requests and responses. The gRPC runtime for some languages is relatively immature. See below for an overview of filters that can help bring gRPC to more languages.
This is a small reverse proxy that can front existing gRPC servers and expose their functionality using gRPC-Web protocol, allowing for the gRPC services to be consumed from browsers. Features: structured logging of proxied requests to stdout. debug HTTP endpoint (default on port 8080 )
HTTP CONNECT proxies are supported by default in gRPC. The proxy address can be specified by the environment variables HTTPS_PROXY and NO_PROXY .
Answered in https://github.com/grpc/grpc-web/issues/347. For gRPC-Web to work, we need a lot of the underlying transport to be exposed to us but that's not the case currently cross browsers. We cannot leverage the full http2 protocol given the current set of browser APIs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With