Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decorrelated jitter v2 explorer #13

Conversation

reisenberger
Copy link
Member

The issue or feature being addressed

Add a demonstrator app for the new decorrelated jitter v2 formula

This code is adapted from https://gist.github.com/reisenberger/2b696bec50d4bf059831c451f0a0cea9, originally at https://gist.github.com/george-polevoy/c0c36c3c22c9c1fe67821b1d8255413a . The original author/credit for that code is george-polevoy . Code used with permission as described at App-vNext/Polly#530 (comment)

This code verifies and demonstrates that the coefficients chosen in the Polly.Contrib.WaitAndRetry Backoff.DecorrelatedJitterBackoffV2(...) implementation generate a series of retry times whose 50th percentiles (medians) fall broadly in exponential backoff by powers of 2.

Any single individual sequence obtained from the iterator will (intentionally) show variation from this - that is the jitter. This code demonstrates (by taking a large enough sample to average out the jitter again) that the broad behaviour is exponential backoff.

The code also outputs (as csv) the distribution of retry times (over the sample set), at each try; and combined over all tries. Visualizing these (for example in PowerBI or Excel) shows the smooth distribution of the formula, as discussed in Polly issue 530 or in the readme of this repo.

Confirm the following

  • I have merged the latest changes from the master branch
  • I have targeted the PR against a DecorrelatedJitterV2Explorer branch

@reisenberger reisenberger added the enhancement New feature or request label Sep 16, 2019
@reisenberger reisenberger merged commit 9e63367 into Polly-Contrib:DecorrelatedJitterV2Explorer Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant