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

Increase default chunked request body chunk size

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.0.1
    • 5.1-beta1
    • HttpCore
    • None

    Description

      Currently the default value is 2 KiB, which is relatively small as discussed in https://github.com/apache/httpcomponents-core/pull/206#discussion_r462154831

      Creating this ticket to discuss using a larger default value. The drawback to increasing the chunk size is that the chunk cache buffer is created for each request entity stream unlike the session buffer which is associated with a potentially persistent connection. This will result in higher allocation pressure for chunked request heavy uses, especially when the chunked request body may be much smaller than the chunk hint size. In order to work around this, the connection may create a reusable buffer based on the chunk hint which is reused across requests.

      Open questions:
      Should we increase the default chunk size?
      What value should we use?

      Attachments

        Activity

          People

            Unassigned Unassigned
            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 - 40m
                40m