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

Use linear backoff on the SDK v3 Waiter due to failure rate for short… #29

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

Ic3w0lf
Copy link
Member

@Ic3w0lf Ic3w0lf commented Jul 29, 2024

… running tasks

What it solves

Since v3 the AWS SDK uses a Waiter with exponential back-off and jitter to check for the state of the task. This is in general a good thing, as it reduces the load on the AWS API and is more efficient.

HOWEVER:
If the task that is started is short-lived, the Waiter might not be able to catch the task in the "RUNNING" state at all, because the potential back-off method will increase the delay to a value that is too high.

The Waiter will randomly catch it in the "STOPPED" state and throw an error as the exit code is not checked in the waiter. To combat this we use the old behavior, we will go back to use the linear back-off by setting both delay values to the same value.

See: https://aws.amazon.com/blogs/developer/waiters-in-modular-aws-sdk-for-javascript/

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • Pull request title is brief and descriptive (for a changelog entry)

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, or enhancement
  • Label as bump:patch, bump:minor, or bump:major if this PR should create a new release

@Ic3w0lf Ic3w0lf added bump:patch Attach to PR to automatically bump patch version on merge bump:minor Attach to PR to automatically bump minor version on merge and removed bump:patch Attach to PR to automatically bump patch version on merge labels Jul 29, 2024
Copy link

🏷️ [bumpr] Next version:v4.1.0 Changes:v4.0.0...geekcell:linear-backoff

@Ic3w0lf Ic3w0lf merged commit 0e10ba3 into main Jul 29, 2024
3 checks passed
@Ic3w0lf Ic3w0lf deleted the linear-backoff branch July 29, 2024 20:18
Copy link

🚀 [bumpr] Bumped! New version:v4.1.0 Changes:v4.0.0...v4.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump:minor Attach to PR to automatically bump minor version on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant