olp-cpp-sdk
1.21.0
|
Computes wait time for the next retry attempt via the exponential backoff with the added jitter. More...
#include <BackdownStrategy.h>
Public Member Functions | |
std::chrono::milliseconds | operator() (std::chrono::milliseconds initial_backdown_period, size_t retry_count) |
Computes the next retry attempt wait time based on the number of retries and initial backdown period. More... | |
Computes wait time for the next retry attempt via the exponential backoff with the added jitter.
This backoff strategy is based on the exponential wait-time approach. For example, when the wait time exponentially grows with each retry attempt, but randomization is added. See https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/
The actual formula can be described in the following way:
|
inline |
Computes the next retry attempt wait time based on the number of retries and initial backdown period.
initial_backdown_period | The initial backdown period. |
retry_count | The number of retries that are already made. |