Adding a "Decorrelated Jitter" wait class
Hi, would it be possible to add a wait class corresponding to the "Decorrelated Jitter" algorithm described in https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/?
I noticed that passing a min to the wait_random_exponential (https://github.com/jd/tenacity/issues/134) does not actually enforce a strict minimum for the wait times it produces. It seems to only set a minimum for the upper bound of the uniform distribution it samples from. Is that correct? I may also be missing something.
I would like to enforce a strict minimum wait time since my use case involves hitting a service that has some heavy rate limits. I think the "Decorrelated Jitter" algorithm allows this while also being pretty much as effective as the "Full Jitter" algorithm.
I'd also be happy to take a pass on trying to implement this if it seems like a worthy addition. Thanks!
Edit I found this ticket which seems to be getting at a similar thing: https://github.com/jd/tenacity/issues/162.
+1 to getting something like this in. I was thinking something that waited, say, min + step * 2 ** try * random.uniform(1 - jitter, 1 + jitter). I'd be happy to implement the documented "Decorrelated Jitter" or something else.
I think this issue could be marked resolved, not that there's a wait_exponential_jitter.