Where can I check the retry logic on AWS JS SDK?

Viewed 60

https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html

This document mentions that "how the SDKs attempt to recover from failures resulting from requests made to AWS services."

Flow can be seen in the pseudocode, but the code that actually executes RETRY cannot be found.

MakeSDKRequest() {
  attempts = 0
  loop {
    GetSendToken()
    response = SendHTTPRequest()
    RequestBookkeeping(response)
    if not Retryable(response)
      return response
    attempts += 1
    if attempts >= MAX_ATTEMPTS:
      return response
    if not HasRetryQuota(response)
      return response
    delay = ExponentialBackoff(attempts)
    sleep(delay)
  }
}

If Retryable is true, do I retry within API service by delivering the information to API?

Is retry logic that works internally in the API? Not internally work in SDK?

0 Answers
Related