Why doesn't gRPC provide a api/method for grpc client to bind the socket to a particular interface?

87 views
Skip to first unread message

jasonlit...@gmail.com

unread,
Mar 3, 2020, 8:47:34 PM3/3/20
to grpc.io
I want my grpc client use a particular interface ip to connect grpc server.  For now, the source ip address grcp client used is decided by kernel. 
I wander, Why doesn't gRPC provide a  api/method for grpc client to bind the socket to a particular interface? This is kind of a common needs.
And, is there any other way to achieve this goal? Would be nice if anyone can help. Thanks a lot.

Nicolas Noble

unread,
Mar 9, 2020, 3:40:21 AM3/9/20
to jasonlit...@gmail.com, grpc.io
When designing the gRPC API, we did not find this to be a common needs feature, no.

While inspecting other common APIs for doing, say, HTTP requests, while libcurl or python's http client do provide a source address, this isn't present in nodejs' socket class, or in Ruby's Net::HTTP - not without monkey patching.

Long story short: no, we do not believe this is an essential feature, and we don't want to complexify our API to provide this knob.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/56e7f413-032c-4dc1-8dc7-aae81bbffea3%40googlegroups.com.

Abhi Arora

unread,
Mar 9, 2020, 3:44:53 AM3/9/20
to Nicolas Noble, jasonlit...@gmail.com, grpc.io
Can you help me then which files needs to be modified for this feature (binding to particular interface or/AND IP)?

It will help us alot.

Thanks for your help 

Reply all
Reply to author
Forward
0 new messages