-
Notifications
You must be signed in to change notification settings - Fork 653
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
Creating a gRPC service listener on an existing TCP socket #2317
Comments
I don't see any API in Node to use a custom TCP server implementation to create an HTTP/2 or TLS server. So, unless I'm missing something, it doesn't look like this is possible in Node. |
Thanks for the quick response! Although I haven't tried this yet, looking at the code I wonder if perhaps this could be done by exposing the handlers for According to the official Node.js docs, Do you think this could even be possible? |
The issue there is that |
I've opened an issue upstream: nodejs/node#46152 Let's see if that goes anywhere :) Thanks again for sharing your thoughts |
I was just looking through the Node documentation for a different reason, and I stumbled on something that might enable this functionality: In the documentation for the
|
I have written a proposal to add an API for this: grpc/proposal#418 |
Is your feature request related to a problem? Please describe.
The problem we have is that app A needs to invoke app B via gRPC, but app B is behind a firewall and cannot open ports. In order to do that, we have configured app A to create an ephemeral TCP listener: app B makes an outbound TCP connection to app A's listener, and then the connection is reused so app B starts a gRPC server on that connection.
We (Dapr project) need to support this scenario with app B being written in a variety of languages. App A is written in Go.
Describe the solution you'd like
We have implemented this in Go using go-grpc. We are able to create a
net.Listener
that returns an existingnet.Conn
, and the gRPC server can "listen" on that.I am not able to find a way to create a gRPC listener on top of an existing TCP socket in the grpc-node SDK.
Describe alternatives you've considered
I have not been able to find alternatives to the
grpc.bind
method in this SDK, which always starts a new listener.The text was updated successfully, but these errors were encountered: