Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-974

Configurable listen socket backlog for the client port

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.3.2
    • 3.6.0
    • server
    • backlog

    Description

      We're running ZooKeeper ensemble(3-node configuration) for production use for months.
      Days ago, we suffered temporary network? problems that caused many reconnections(about 300) of ephemeral nodes in one ZooKeeper server.

      The almost all clients successfully reconnected to the other ZooKeeper servers,
      but one client failed to reconnect in time and got a session expired message from the server.
      (The problem is that our clients died when they got SessionExpired message.)

      There were many listenQ overflows/drops and out resets in a minute just before the problem situation.

      So we patched ZooKeeper to increase the backlog size for the client port socket to avoid unhappy cases like this.
      As ZooKeeper uses default backlog size(50) to bind(), we added "clientPortBacklog" option.

      Though the default backlog should be good for common environment,
      we believe that configuring the size is also meaningful.

      [Note]
      On linux, below parameter :

      net.core.somaxconn

      needs to be larger than above "clientPortBacklog" to correctly configure listen socket backlog

      Attachments

        1. ZOOKEEPER-974.patch
          9 kB
          Hoonmin Kim
        2. ZOOKEEPER-974.001.patch
          28 kB
          Josh Elser
        3. ZOOKEEPER-974.001.master.patch
          31 kB
          Josh Elser

        Issue Links

          Activity

            People

              elserj Josh Elser
              harebox Hoonmin Kim
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 50m
                  2h 50m