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

Add setKeepAlive support for NIOServerCnxn

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.6.0, 3.4.14, 3.5.6
    • 3.6.1
    • server

    Description

      Suggest to add setKeepAlive support for NIOServerCnxn. It can resolve some tcp connection leak issue caused by network broken. In some occasional case(network switcher broken, network card broken, iptables firewall strategy and so on....), zookeeper server would lose the FIN packet when the client close the connection. In such scenario, the connection will be treated as alive forever and never be closed.
      These leaked tcp connections introduce the resource leak risk.

      setKeepAlive for every client NIO connection can prevent the resource leak risk.

      I will send the patch later. Hope someone can help to review it.

      Thanks.

      Attachments

        Issue Links

          Activity

            People

              yfx416 Pierre Yin
              yfx416 Pierre Yin
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 1h 10m
                  1h 10m