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

Oleg Kalnichevski commented on HTTPCLIENT-2404:
-----------------------------------------------

[~jaypi75] Just a few comments in random order:

There are 5 distinct configuration levels: the transport level (applies to 
specific i/o models), the connection management level, the TLS level, the 
protocol level and the request execution level. 

The socket timeout presently can be set at 4 levels, each layer being able to 
override the setting of lower levels. 
1. Transport level: `SocketConfig` (applies to the classic transport); 
`IOReactorConfig` (applies to the async transport)
2. Connection management level: `ConnectionConfig` 
3. TLS level: `TLSConfig`
4. Request execution: `RequestConfig`

All other timeouts apply to the connection management only.

ConnectionEndpoint exposes the socket timeout of the underlying connection at 
runtime but it is not a distinct layer.

This is it. There is nothing more to the timeout configuration. 

Now I actually think we need a proper configuration guide, not timeout 
documentation. Timeouts are just a small subset of configurable settings with 
the socket timeout only being a bit special.  

Oleg


> Provide comprehensive timeout configuration documentation with interaction 
> matrix and override behavior
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-2404
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2404
>             Project: HttpComponents HttpClient
>          Issue Type: Wish
>          Components: HttpClient (async), HttpClient (classic)
>    Affects Versions: 5.5, 5.5.1
>            Reporter: Jens Popp
>            Priority: Major
>              Labels: volunteers-wanted
>             Fix For: Future
>
>
> Apache HTTP Client currently exposes numerous timeout settings across 
> different configuration points (connection manager, request config, socket 
> config, etc.). Right now they are documented (as far as I was able to find) 
> only on the point, where they can be set. The lack of comprehensive 
> documentation about their interactions, precedence rules, and override 
> behavior makes it difficult to configure clients correctly—especially in 
> distributed systems where timeout handling is critical for failover and 
> performance.
> *Problem Statement:*
> As demonstrated my comment in HTTPCLIENT-2386, seemingly minor implementation 
> changes can have severe production impacts. In our case, upgrading from 5.5 
> to 5.5.1 changed timeout behavior during TLS handshake scenarios. When 
> servers under heavy load (100% CPU) could establish socket connections but 
> failed TLS handshakes, the increased timeout (defaulted back to request 
> timeout instead of connection timeout) prevented proper failover to backup 
> servers, causing service degradation.
> *Requested Documentation:*
>  # *Complete timeout inventory* - All configurable timeouts with their 
> default values and scope
>  # *Interaction matrix* - How timeouts interact when multiple apply to the 
> same operation
>  # *Override rules* - Precedence order when timeouts are set at different 
> levels (global, connection manager, request)
>  # *Lifecycle coverage* - Which timeout applies to each phase (DNS, connect, 
> TLS handshake, data transfer)
>  # *System best practices* - Recommended patterns for different scenarios



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to