Update in-process-proxy.md

This commit is contained in:
Wenbo Zhu 2020-07-31 15:11:48 -07:00 committed by GitHub
parent 90e83cd618
commit 9c1a174e19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -1,18 +1,18 @@
# Overview
In-process proxies allow a browser client to talk to the gRPC server directly without deploying any intermediary process
In-process proxies allow a browser client to talk to a gRPC server directly without relying on any intermediary process
such as an Envoy proxy. This document provides a high-level design guidelines on how we expect such a "proxy" to work.
# The choice of HTTP stack
We strongly recommend the gRPC-Web module use the default HTTP stack provided by the language platform, or in the case of Java,
the standard Java Servlet stack. This is to ensure maximum portability and to ease integration between gRPC-Web and existing Web
We strongly recommend that the gRPC-Web module use the default HTTP stack provided by the language platform, or in the case of Java,
the standard Java Servlet framework. This is to ensure maximum portability and to ease integration between gRPC-Web and existing Web
frameworks.
The actual HTTP version that the HTTP stack supports may include both HTTP/1.1 and HTTP/2. In the runtime, it's up to the user-agent and
intermediaries to negotiate the HTTP version, which is mostly transparent to the gRPC-Web module.
intermediaries to negotiate the HTTP version, which is transparent to the gRPC-Web module.
# Proxy or not
# Request translation
For most languages, the gRPC-Web module will handle the gRPC-Web request, perform the translation, and then proxy the request using a gRPC client
to the gRPC server via a local socket. The gRPC-Web support is fully transparent to the gRPC server.
@ -27,4 +27,4 @@ However, since CORS is a mandatory feature for gRPC-Web proxies, port sharing sh
# Core features
The gRPC-Web module should implement only the [core gRPC-Web features](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md) and leave to the HTTP/Web stack provided by the language platform to handle [Web-framework-level features](https://github.com/grpc/grpc-web/blob/master/doc/browser-features.md) such as XSRF, CORS policies. Some of those features may be incompatible with what Envoy supports.
The gRPC-Web module should implement only the [core gRPC-Web features](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md) and leave to the HTTP/Web stack provided by the language platform to handle [Web-framework-level features](https://github.com/grpc/grpc-web/blob/master/doc/browser-features.md) such as XSRF, CORS policies. Some of those features may be incompatible with what Envoy supports for gRPC-Web.