Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add grpc-web proxy for non-http2 clients #7345

Closed
clevinson opened this issue Sep 18, 2020 · 5 comments · Fixed by #8077
Closed

Add grpc-web proxy for non-http2 clients #7345

clevinson opened this issue Sep 18, 2020 · 5 comments · Fixed by #8077
Assignees
Milestone

Comments

@clevinson
Copy link
Contributor

clevinson commented Sep 18, 2020

Create flag (enabled by default) to launch the grpc-web proxy for non-HTTP2 grpc web clients

Ref #5921

@clevinson clevinson added this to the v0.41 milestone Sep 18, 2020
@aaronc aaronc modified the milestones: v0.41, v0.40.1 Oct 14, 2020
@aleem1314 aleem1314 mentioned this issue Dec 4, 2020
9 tasks
@alexanderbez
Copy link
Contributor

What is a gRPC web proxy in this context and how does it differ from the gRPC HTTP gateway?

@ethanfrey
Copy link
Contributor

I know this sounds like a nice feature to add, but I would be hesitant to add yet another server until there is a clear need (please link the client side project that cannot work without this). Every additional server is more ops overhead, as well as code maintenance.

grpc-web supports all modern browsers (since early 2019 or so) and uses HTTP/2.0. It does everything according to the grpc spec except client side streaming, which I doubt we use (and definitely would not be supported by the web proxy).

How about some explanation of concrete use cases here?

@amaury1093
Copy link
Contributor

amaury1093 commented Dec 17, 2020

I think there's some confusion in the title, we are adding exactly the grpc-web you linked. Their README lists these 2 items:

  • grpcweb: a go package that wraps a gRPC server
  • grpcwebproxy: a standalone binary that wraps an arbitrary gRPC server

It's the first one that aleem's implementing in #8077. Somehow we still call it "proxy".

@amaury1093
Copy link
Contributor

I wasn't aware HTTP2 was supported by 95% of browsers today. In this case, can a browser talk directly to a gRPC server (I thought no)? If yes, why do we even need grpc-web?

@ethanfrey
Copy link
Contributor

Ah, re-reading the docs. Maybe that is needed for HTTP/2.0 as well.
I thought it was only needed for backwards compatibility.

I would be interesting to test this out sometime. With CosmJS, we use the grpc types but talk directly to tendermint rpc, as that is well defined and working since rc1 and before. We have no bandwidth to test out the grpc server with this, but if someone from your team does, you can probably use most of the types from it, and I'm sure you can get some pointers on discord.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants