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

Add an exponential backoff to the apiPoll function. #2693

Merged
merged 4 commits into from
Dec 17, 2019
Merged

Conversation

AWare
Copy link
Contributor

@AWare AWare commented Dec 9, 2019

What does this change?

While this was probably sensible, testing with @paperboyo didn't show any improvement.

This PR adds an exponential backoff with jitter to the apiPoll function. This increases the delay to 2^(attempt) plus a little random noise.

How can success be measured?

Testing this against an upload of 30 images reduced the http request total from ~800 to ~500

Slightly more performant batch jobs.

Screenshots (if applicable)

Who should look at this?

@akash1810 @mbarton @paperboyo

Tested?

  • locally
  • on TEST

kahuna/public/js/util/async.js Outdated Show resolved Hide resolved
kahuna/public/js/util/async.js Outdated Show resolved Hide resolved
@prout-bot
Copy link

Seen on auth, usage, cropper, collections, media-api, kahuna, image-loader, metadata-editor, leases (merged by @AWare 8 minutes and 39 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants