Retry when 429 and 5XX

Retry usage guidance

Consider the following guidelines when using retries in your MicroServices

  • If you are using the REST API for inter-(micro)-service communication, retry the operation if the result code is 429 (Too Many Requests) or an error in the 5xx range. Do not retry for any other errors.
  • For 429 errors, only retry after the time indicated in the¬†Retry-After¬†header.
  • For 5xx errors, use exponential back-off, with the first retry at least 5 seconds(?) after the response.
  • Do not retry on errors other than 429 and 5xx.

Dattatraya Kale

Aspiring agile software craftsman, clean code, polyglot, in love with different programming paradigm. I am on a never-ending journey towards mastery of software.

Leave a Reply