Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-639

Add a configurable ResponseOutOfOrder strategy for DefaultBHttpClientConnection

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.1-beta1
    • HttpCore
    • None

    Description

      In a known environment where the server fully reads full request bodies before sending a response, I would like to disable the expensive checkForEarlyResponse checks implemented by DefaultBHttpClientConnection.sendRequestEntity.

      Using TLS the check blocks for 1ms every 8kb, which limits the upload rate to at most eight megabytes per second, relatively low in a data-center environment.

      Proposed interface:

      public interface ResponseOutOfOrderStrategy {
      
          /**
           * Returns the interval in bytes describing how often the socket is checked for an out-of-order response.
           * The default implementation uses 8kb. A value of zero results in checks being disabled, this may result
           * in requests blocking until the socket timeout is reached while a server sends an out-of-order response.
           */
          int determineResponseCheckIntervalBytes(ClassicHttpRequest request, Socket socket);
      }
      

      I'd be happy to implement and contribute such a feature if you agree that it's reasonable.

      I appreciate any input and feedback you can provide!

      Attachments

        Activity

          People

            michael-o Michael Osipov
            ckozak Carter Kozak
            Votes:
            0 Vote for this issue
            Watchers:
            4 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 - 13h 20m
                13h 20m