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

regular gRPC and gRPC-Web over same port ? #209

Closed
nikkolasg opened this issue Jun 14, 2018 · 3 comments
Closed

regular gRPC and gRPC-Web over same port ? #209

nikkolasg opened this issue Jun 14, 2018 · 3 comments

Comments

@nikkolasg
Copy link

nikkolasg commented Jun 14, 2018

Hi all,

I was wondering if it is possible to use the same port to accept gRPC and gRPC-Web connections ? I have a use case where some servers talks to each other using already gRPC and I'd like to open a external API callable from browsers, so using gRPC-Web but using the same port if possible.
Is it possible already ? Is it possible at all ? and if yes, what would it take to do it ?

Thanks a lot !

PS: I've seen someone talking about it for a Rust impl. tower-rs/tower-grpc#35

@graup
Copy link

graup commented Aug 17, 2018

Definitely possible, but depends on your implementation. For Go, I've had success with this guide, specifically the cmux version.

@johanbrandhorst
Copy link
Contributor

My GopherJS gRPC-Web example does this, the key is to split traffic in a handler: https://github.com/johanbrandhorst/grpcweb-example/blob/master/main.go#L123.

@johanbrandhorst
Copy link
Contributor

This issue is unrelated to the gRPC-Web implementation.

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

No branches or pull requests

3 participants