Hi Emmanuel,

Thanks for the reply.  : )

I too have arrived to the same solution from the client side, and for now I do 
not see the problem anymore. Below changes I did in client side

 

/* https://github.com/grpc/proposal/blob/master/A18-tcp-user-timeout.md */

 

        ChannelArguments args;

        args.SetInt(GRPC_ARG_KEEPALIVE_TIME_MS,10000);

        args.SetInt(GRPC_ARG_KEEPALIVE_TIMEOUT_MS,5000);

 

        v.push_back(MessagingImplClient(

                        grpc::CreateCustomChannel(

                                address,

                                grpc::InsecureChannelCredentials(),

                                args

                                )

        ));

 

>From the server side, I will try use the “max_connection_age_ms”. 

 

Thanks and Best Regards,

Surajit

+91 9886677508

 

 

From: [email protected] <[email protected]> On Behalf Of Emmanuel 
Delmas
Sent: Monday, March 15, 2021 4:58 PM
To: grpc.io <[email protected]>
Subject: [grpc-io] Re: GRPC re-connection with IP change in client side

 

Hi Surajit

 

I've learned that you cannot trigger directly a refresh on DNS resolution. But 
refresh are triggered each time a connection is closed.

It means that having a channel with multiple connections that are stopped 
regularly will provide you an up to date DNS resolution.

To stop regularly your connections from the server side, use the keepalive 
parameters ("max_connection_age_ms").

A channel creates a connection for all received IP from DNS resolution. Use 
http2 load balancing to use all of them.

To detect stucked gRPC connections from the client side, add keepalive timeout 
parameter ("grpc.keepalive_time_ms", "grpc.keepalive_timeout_ms").

 

Hope it will help you

 

Emmanuel Delmas

 

Le jeudi 11 mars 2021 à 11:16:46 UTC+1, [email protected] 
<mailto:[email protected]>  a écrit :

Hi All,

I have a GRPC server client model. The client wait on read indefinitely. In 
case where the server is stopped, the client gets notified and I retry 
connection again until success. This works fine.

In another case when the router the client is connected to goes down, the 
client reconnect to the next available router and try a GRPC reconnection, but 
the message never reaches the server.

I tried applying a deadline and every time deadline exceeded do a 
re-connection. The re-connection works as long the router is same and client 
have same ip, in case the router is changed and client get a new ip the message 
again does not reach the server.

What is the right method of a GRPC reconnection with server in case of a client 
ip change ?

it appears the read returns approximately after 20 minutes, till that time it 
doesn't let any new packet reach the server 

 

Thanks and Best Regards,

Surajit 

-- 
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 [email protected] 
<mailto:[email protected]> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/5dfc9895-b39c-468d-b074-f041db5c0a90n%40googlegroups.com
 
<https://groups.google.com/d/msgid/grpc-io/5dfc9895-b39c-468d-b074-f041db5c0a90n%40googlegroups.com?utm_medium=email&utm_source=footer>
 .

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/00d801d719a7%243550a770%249ff1f650%24%40snehix.com.

Reply via email to