How to set retry delay after connection failure

178 views
Skip to first unread message

sari...@gmail.com

unread,
Jul 18, 2016, 10:07:53 AM7/18/16
to grpc.io
Right now the retry delay gradually increases. How can i set it to a static value?

Eric Anderson

unread,
Jul 18, 2016, 12:15:04 PM7/18/16
to sari...@gmail.com, grpc.io
What language are you working in? Is there a reason you want at static value? You don't want to just cap the exponential backoff to a lower maximum?

On Mon, Jul 18, 2016 at 7:07 AM, <sari...@gmail.com> wrote:
Right now the retry delay gradually increases. How can i set it to a static value?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/7570b608-d5a6-4f49-8eff-6a12fd28d774%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sari...@gmail.com

unread,
Jul 18, 2016, 12:21:11 PM7/18/16
to grpc.io, sari...@gmail.com
C++. I have a secondary thread sending a heartbeat call to server every 200ms. That is used to determine if user is still logged in, if server doesn't receive the heartbeat, server deletes the user session AKA logouts the user. So in a sense i myself is handling the reconnect/retrying so that GRPC's internal retry delay is unnecessarily causing delay in this whole cycle. 


On Monday, 18 July 2016 22:15:04 UTC+6, Eric Anderson wrote:
What language are you working in? Is there a reason you want at static value? You don't want to just cap the exponential backoff to a lower maximum?
On Mon, Jul 18, 2016 at 7:07 AM, <sari...@gmail.com> wrote:
Right now the retry delay gradually increases. How can i set it to a static value?

--
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.

sari...@gmail.com

unread,
Jul 19, 2016, 2:10:03 PM7/19/16
to grpc.io, sari...@gmail.com

After searching through the source code i found the setting for this. 


grpc::ChannelArguments channel_args;
channel_args
.SetInt("grpc.testing.fixed_reconnect_backoff", 1000);


There is another relevant argument setting in grpc_types.h,

#define GRPC_ARG_MAX_RECONNECT_BACKOFF_MS "grpc.max_reconnect_backoff_ms"

But I'm using version 0.12.0 which doesn't have that option :P

Reply all
Reply to author
Forward
0 new messages