You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by TyqITstudent <gi...@git.apache.org> on 2018/11/04 09:45:02 UTC

[GitHub] zookeeper pull request #688: reduce session revalidation time after zxid rol...

GitHub user TyqITstudent opened a pull request:

    https://github.com/apache/zookeeper/pull/688

    reduce session revalidation time after zxid roll over

    **Problem:**
    1. Sometimes Zookeeper cluster will receive a lot of connections from clients, sometimes connection number even exceeds 1W. When zxid rolls over, the clients will reconnect and revalidate the session.
    2. In Zookeeper design structure, when follower server receives the session revalidation requests, it will send requests to leader server, which is designed to be responsible for session revalidation.
    3. In a short time, Leader will handle lots of requests. I use a tool to get the statistics, some clients need to wait over 20s. It is too long for some special clients, like ResourceManager.
    
    **Solution:**
    1. When zookeeper cluster finishes reelection(which will cost a few seconds). The leader will send the time point TimeA to followers. (which is the approximate value of roll over)
    2. Followers can judge the most session revalidations. When the timeout of the session is less than currentTime - timeA , follower will put the session on the touchTable. (Every half tickTime, followers will send sessions of touchTable to leader to validate).
    3. When the timeout of the session is larger than currentTime - timeA, the follower will send session revalidation request to leader right away.
    
    So the leader will receive fewer requests from followers.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/TyqITstudent/zookeeper ZOOKEEPER-3169

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/688.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #688
    
----
commit 6a1aca3de5585325c9b4fb595813fb0f86d5a2ea
Author: 田毅群 <ti...@...>
Date:   2018-11-04T08:45:53Z

    reduce session revalidation time after zxid roll over

----


---

[GitHub] zookeeper issue #688: reduce session revalidation time after zxid roll over

Posted by nkalmar <gi...@git.apache.org>.
Github user nkalmar commented on the issue:

    https://github.com/apache/zookeeper/pull/688
  
    LGTM.
    Please create a jira for this PR and/or mention the jira number in the commit message and PR name.
    
    Thanks!


---

[GitHub] zookeeper pull request #688: reduce session revalidation time after zxid rol...

Posted by TyqITstudent <gi...@git.apache.org>.
Github user TyqITstudent closed the pull request at:

    https://github.com/apache/zookeeper/pull/688


---

[GitHub] zookeeper issue #688: reduce session revalidation time after zxid roll over

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/zookeeper/pull/688
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2579/



---