You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a specific problem? Or an existing feature? Please describe.
Similar to existing feature.
Describe your proposed or preferred solution:
Expose a new backoff strategy, in this package, similar to Backoff.DecorrelatedJitterV2.cs but that does not include the exponential aspect in the returned sleep durations.
Describe any alternative options you've considered:
A naive implementation:
publicstaticIEnumerable<TimeSpan>ConstantJitterBackoff(TimeSpanaverageDelay,intretryCount,doublejitterFactor=0.5){for(vari=0;i<retryCount;i++){// Calculate random jittervarjitter=((Random.Shared.NextDouble()*2)-1)*jitterFactor;// Apply jitter factor to the averageDelayvardelayWithJitter= TimeSpan.FromTicks((long)(averageDelay.Ticks *(1+jitter)));yieldreturndelayWithJitter;}}
Any additional info?
This would be useful for scenarios where we want to retry with some randomness but always around a specific interval.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a specific problem? Or an existing feature? Please describe.
Similar to existing feature.
Describe your proposed or preferred solution:
Expose a new backoff strategy, in this package, similar to Backoff.DecorrelatedJitterV2.cs but that does not include the exponential aspect in the returned sleep durations.
Describe any alternative options you've considered:
A naive implementation:
Any additional info?
This would be useful for scenarios where we want to retry with some randomness but always around a specific interval.
The text was updated successfully, but these errors were encountered: