zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Benediktson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2869) Allow for exponential backoff in ClientCnxn.SendThread on connection re-establishment
Date Mon, 07 Aug 2017 23:56:00 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-2869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16117581#comment-16117581

Dan Benediktson commented on ZOOKEEPER-2869:

Yeah, ours has been running in production at Twitter for 1.5 years now. It's not rocket surgery,
but it at least unearthed that other bug I mentioned, so I think it's fair to call it battle-tested.

The only arguable downside I see to the implementation we have is that, while the implementation
has a pluggable backoff provider, there's no config for selecting the implementation, and
there's no implementation to maintain the existing behavior; it just forces the caller into
using exponential backoff for reconnect. And while I'm a firm believer that it's better to
just make the product do "the right thing" than it is to provide a bunch of knobs, I can see
if this behavior change is not viewed as being obviously preferable. Would be good if one
of the committers or PMC can chime in with their view.

In the meantime, I'll look at getting a pull request put together. I haven't tried submitting
a ZK patch since the project moved off SVN.

> Allow for exponential backoff in ClientCnxn.SendThread on connection re-establishment
> -------------------------------------------------------------------------------------
>                 Key: ZOOKEEPER-2869
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2869
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.10, 3.5.3
>            Reporter: Nick Travers
>            Priority: Minor
> As part of ZOOKEEPER-961, when the client re-establishes a connection to the server,
it will sleep for a random number of milliseconds in the range [0, 1000). Introduced [here|https://github.com/apache/zookeeper/commit/d84dc077d576b7cdfbfd003e3425fab85ca29a44].
> These reconnects can cause excessive logging in clients if the server is unavailable
for an extended period of time, with reconnects every 500ms on average.
> One solution could be to allow for exponential backoff in the client. The backoff params
could be made configurable.
> [3.5.x code|https://github.com/apache/zookeeper/blob/release-3.5.3/src/java/main/org/apache/zookeeper/ClientCnxn.java#L1059].
> [3.4.x code|https://github.com/apache/zookeeper/blob/release-3.4.9/src/java/main/org/apache/zookeeper/ClientCnxn.java#L1051].

This message was sent by Atlassian JIRA

View raw message