Is grpc.min_reconnect_backoff_ms confusingly named and documented?

88 views
Skip to first unread message

John Hume

unread,
Dec 18, 2017, 11:08:21 PM12/18/17
to grpc.io
With some backoff-related changes[1] released in grpc 1.8.0, I'm reviewing the available channel_args for configuration[2] and trying to resolve those with the backoff spec[3].

The doc comment for grpc.min_reconnect_backoff_ms says it's the "minimum time between subsequent connection attempts, in ms," but I believe that value is used as the spec's MIN_CONNECT_TIMEOUT, in which case subsequent attempts could be made after less than that amount of time, assuming the first attempt fails quickly and INITIAL_BACKOFF (configurable with "grpc.initial_reconnect_backoff_ms") is set to less than MIN_CONNECT_TIMEOUT (as in the default configuration, where MIN_TIMEOUT_CONNECT is 20 seconds, and INITIAL_BACKOFF is 1 second).

If the above is correct, should grpc.min_reconnect_backoff_ms be renamed and the documentation changed to reflect its actual usage as the MIN_CONNECT_TIMEOUT?

Thanks.
-hume.

[1]: https://github.com/grpc/grpc/pull/13121/files
[2]:
https://github.com/grpc/grpc/blob/v1.8.0/include/grpc/impl/codegen/grpc_types.h#L236-L242
[3]: https://github.com/grpc/grpc/blob/v1.8.0/doc/connection-backoff.md

David Garcia Quintas

unread,
Jan 17, 2018, 10:41:14 PM1/17/18
to grpc.io
Hey John,

Thank you for pointing this out. The backoff code has recently gone through changes in order to address all this confusion. In fact, 1.8.0 doesn't include subsequent changes make to the code which clean it up even further. In any case, your point still stands at current head: I've created https://github.com/grpc/grpc/pull/14057 to address the issue. Please feel free to make any comments on the PR itself. Thanks!

David.
Reply all
Reply to author
Forward
0 new messages