Friday, February 25, 2022

Exponential backoff and circuit breaker

The idea behind using exponential backoff with retry is that instead of retrying after waiting for a fixed amount of time, we increase the waiting time between reties after each retry failure. Incrementally increasing the wait time between the consecutive retry requests after each failure gives the service some breathing time so that if the fault is due to service overload, it could get resolved faster.

The intent of the Circuit Breaker pattern is to handle the long-lasting transient faults. If the number of retry failures reaches above a certain threshold value, further calls to the service will immediately return failure to the caller instead of executing our retry logic. If the service becomes available after some timeout, the callers will be able to call the service and the usual retry mechanism will come in play again.

source: https://dzone.com/articles/understanding-retry-pattern-with-exponential-back

No comments:

Post a Comment