Skip to content

feat: exponential random retry #205

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

Merged
merged 3 commits into from
Jun 3, 2021
Merged

feat: exponential random retry #205

merged 3 commits into from
Jun 3, 2021

Conversation

rhajek
Copy link
Contributor

@rhajek rhajek commented Jun 3, 2021

Proposed Changes

Improves exponential random retry strategy in write api like in python client influxdata/influxdb-client-python#225

Delay is computed using random exponential backoff as a random value within the interval retryInterval * exponentialBase^(attempts-1) and retryInterval * exponentialBase^(attempts).

Example for retryInterval=5_000, exponentialBase=2, maxRetryDelay=125_000, total=5

Retry delays are random distributed values within the ranges of [5_000-10_000, 10_000-20_000, 20_000-40_000, 40_000-80_000, 80_000-125_000]

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • dotnet test completes successfully
  • Commit messages are in semantic format
  • Sign CLA (if not already signed)

Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR 👍. There is only one requirement that should be satisfy before we accept the PR:

@rhajek rhajek requested a review from bednar June 3, 2021 11:28
@rhajek rhajek merged commit 73eb2c5 into master Jun 3, 2021
@rhajek rhajek deleted the feat/random-retry branch June 3, 2021 11:56
@bednar bednar added this to the 1.19.0 milestone Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants