I have been trying to understand the difference between apicallattempttimeout and apicalltimeout. What I could understand is apicalltimeout is the total time till the client request waits for the response before giving up whereas apicallattemptimeout includes timeout for retries as well in addition to the time in the first attempt.
So does this mean that apicallattemptimeout will always be more than apicalltimeout? Example : Suppose I keep apicalltimeout to be 1000ms and for a single retry I want the timeout to be 300ms. So values will be for apicalltimeout= 1000ms and apicallattemptimeout= 1300ms ? API docs dont seem to help here
apicallattempttimeout and apicalltimeout
1 Answer 1
ApiCallAttemptTimeouttracks the amount of time for a single http attempt and the request can be retried if timed out on api call attempt.ApiCallTimeoutconfigures the amount of time for the entire execution including all retry attempts.
Checkout this best practices guide for more details - https://github.com/aws/aws-sdk-java-v2/blob/97ee691a1a4f689a238f4a92acc4908f87979f05/docs/BestPractices.md?plain=1#L56
Comments
Explore related questions
See similar questions with these tags.
apiCallTimeoutshould be greater thanapiCallAttemptTimeoutbecause the former includes retries. Whether it must be greater is a different question. The SDK may allow you to set any relative values and it will simply timeout whichever is exceeded first.