ajbaldocchi commented on pull request #356:
URL: 
https://github.com/apache/httpcomponents-client/pull/356#issuecomment-1082768882


   The intent is to handle a transient network blip or to bridge the gap while 
the service on the other end is being restarted without necessitating 
higher-level logic to trigger application-level retries for very short-lived 
transient issues (that may take slightly longer than immediate, on the order of 
10-100ms, or what timer granularity permits) such as these examples. Then the 
higher-level logic can focus on handling non-transient issues like service down 
or resource not available and the only change necessary is making an 
implementation of HttpRequestRetryStrategy and using it in the builder. Or 
possibly amending the DefaultHttpRequestRetryStrategy to add a constructor with 
both retry parameters if that would be desirable. But the functionality would 
be identical to what it is now if no non-default implementation of the 
additional getRetryInterval method exists.
   It also wasn't clear to me from the Javadoc in HttpRequestRetryStrategy that 
the retry didn't apply to I/O errors until much debugging and finally examining 
the code in DefaultHttpRequestRetryStrategy since a retryRequest exists for 
IOExceptions (the assumption of no delay between retries on IOException was 
tacit) so it adds symmetry and clarification. I should mention I'm using the 
async HTTP client as part of a background task so nobody is sitting at the 
other end specifically waiting for the retry in my case, but the alternative as 
things are now is to set the retry count very high and in the case of a 
retriable status code rather than an IOException that may cause the opposite 
problem.


-- 
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