[ 
https://issues.apache.org/jira/browse/HTTPCORE-639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17171641#comment-17171641
 ] 

ASF subversion and git services commented on HTTPCORE-639:
----------------------------------------------------------

Commit 88c7515a6f3529d8e6fa79880beccc868b295626 in httpcomponents-core's branch 
refs/heads/5.1.x from Carter Kozak
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-core.git;h=88c7515 ]

HTTPCORE-639: Add a configurable ResponseOutOfOrder strategy for 
DefaultBHttpClientConnection

This adds a configurable ResponseOutOfOrderStrategy in place of the
previous always-enabled behavior, and uses the no-op
NoResponseOutOfOrderStrategy implementation by default.

The previous behavior can be used by selecting the
MonitoringResponseOutOfOrderStrategy, which has been updated
to support more flexible behavior. Note that this strategy
results in a 1 ms pause for every chunk transferred, limiting
upload speed using the default 8 KiB chunk size to at most
8 MiB/second.

The original discussion can be found on the mailing list:
https://www.mail-archive.com/[email protected]/msg09911.html

This closes #206


> Add a configurable ResponseOutOfOrder strategy for 
> DefaultBHttpClientConnection
> -------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-639
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-639
>             Project: HttpComponents HttpCore
>          Issue Type: New Feature
>          Components: HttpCore
>            Reporter: Carter Kozak
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 5.1
>
>          Time Spent: 13h 20m
>  Remaining Estimate: 0h
>
> 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:
> {code:java}
> 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);
> }
> {code}
> 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!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to