rschmitt opened a new pull request, #550:
URL: https://github.com/apache/httpcomponents-core/pull/550

   This setting prevents connections from going idle for longer than five 
seconds. Overriding the operating system defaults seems to be a best practice:
   
   https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html 
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-reusing-connections.html
   
   This prevents a failure mode where the network silently drops the 
connection, resulting in a stale connection in the connection pool that the 
client has no way of _knowing_ is stale:
   
   
https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#connection-idle-timeout
   
   Connections that are dropped in this way create a significant risk of a 
subsequent request failure, and the exception thrown in this case may or may 
not be safely retriable. Since TCP keep-alive is extremely cheap, and the 
failures caused by not using it are quite opaque, I think it makes sense to 
enable it by default. Traditionally this was not possible in a pure Java 
client, but the Java ecosystem now offers support for this option pretty much 
everywhere.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to