Re: How to set source ip address in grpc client application

189 views
Skip to first unread message
Message has been deleted

GVA Rao

unread,
Oct 18, 2017, 4:15:45 AM10/18/17
to grpc.io


On Wednesday, October 18, 2017 at 12:35:35 PM UTC+5:30, GVA Rao wrote:
I would like my grpc client application to carry specified source ip in case client has multiple paths to reach grpc server.
grpc insecure_channel rpc has only destination ip address i.e. server address field but not client source ip field.
Is there a way to set source ip address in grpc client application?  If not in grpc is there way we can set source in python application and use insecure_channel as is?

Nathaniel Manista

unread,
Oct 18, 2017, 11:43:09 AM10/18/17
to GVA Rao, grpc.io
On Wed, Oct 18, 2017 at 12:05 AM, GVA Rao <gvar...@gmail.com> wrote:
I would like my grpc client application to carry specified source ip in case client has multiple hops to reach grpc server.
grpc insecure_channel rpc has only destination ip address i.e. server address field but not client source ip field.
Is there a way to set source ip address in grpc client application?  If not in grpc is there way we can set source in python application and use insecure_channel as is?

This sounds like something that you would want to include in the metadata you pass when invoking your RPCs.
-Nathaniel

dekum...@gmail.com

unread,
Feb 23, 2018, 1:13:29 AM2/23/18
to grpc.io
Hi,

Is there way in grpc to bind to source ip address. 
In scenario of multiple physical ecmp interface to reach server it's better to use loopback interface source ip.

Thanks,
Deepak
Message has been deleted

xing...@gmail.com

unread,
Nov 15, 2018, 1:58:16 AM11/15/18
to grpc.io
Hi, 
I am facing the same problem, does there any solutions?

Thanks 
xcc

xing...@gmail.com

unread,
Nov 15, 2018, 2:32:35 AM11/15/18
to grpc.io

found this, the feature seems under developing . https://github.com/grpc/grpc-java/issues/4900

Carl Mastrangelo

unread,
Nov 15, 2018, 2:05:23 PM11/15/18
to grpc.io
I believe the original questions was for Python, not Java.   There currently isn't a way to get the currently bound address in Java *except* via the Channelz service.   The issue you found is a tracking issue for an experimental feature to customize connection setup.  The use case is narrowly scoped, so I don't think it's what you are looking for.  

Srini Polavarapu

unread,
Nov 26, 2018, 1:14:34 PM11/26/18
to grpc.io
Specifying a source address is not supported in gRPC-Core on which Python is wrapped. Please file an issue on github and give details on your use case. I see that a similar issue for C++ was created recently. You could just add  your comments there.
Reply all
Reply to author
Forward
0 new messages