Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1493

Conditional stale connection checking

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4 Alpha1
    • Component/s: None
    • Labels:
      None

      Description

      Stale connection checking is expensive. At present if it is enabled, it is performed for every connection. This is quite expensive and generates additional requests.

      One reason for a server to drop a connection is when the connection has been idle for a while. Some servers send Keep-Alive headers to inform the client of this; if they don't, then the client will see an unexpected disconnection. Stale connection checking avoids this problem, but at the cost of additional requests. When a connection is not busy, this is acceptable, but for a busy connection the checks are mostly unnecessary.

      Another reason for dropping a connection is after it has been reused many times. The server should send a connection close as part of the final response, but if it does not, a stale check would help.

      For these reasons, it would be useful to be able to implement conditional stale connection checking, based on connection idle time and/or connection reuse count. These conditions should be optionally selectable.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: