Skip to content

Delays generated by DecorrelatedJitterBackoffV2 are always shorter than delays generated by ExponentialBackoff #34

@alasdairstarky

Description

@alasdairstarky

Summary:

Given that DecorrelatedJitterBackoffV2 uses takes the median of the inital delay, I had expected that the sum of all delay times would sometimes be higher than the sum of all delay times generated by ExponentialBackoff. This does not seem to be the case. Maybe I am misunderstanding? Can we be guaranteed that the sum of the DecorrelatedJitterBackoffV2 delays will always be less than the sum of the ExponentialBackoff delays?

I want to know as I am trying to understand the maximum amount of time that an operation could take including timeouts, delays and retries.

Here are the inputs:

initialDelay: 300ms
retryCount: 3

First generate a list of delays using ExponentialBackoff. Sum the total of all of these delays. (2,100ms)
Next generate lists of delays using DecorrelatedJitterBackoffV2. Sum the total of all of these delays and compare to the sum from ExponentialBackoff.



Expected behavior:

Sometimes the sum of the delays generated by DecorrelatedJitterBackoffV2 is greater than the sum of the delays generated by ExponentialBackoff.



Actual behaviour:

The sum of the delays generated by DecorrelatedJitterBackoffV2 is never greater than the sum of the delays generated by ExponentialBackoff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions