-
Notifications
You must be signed in to change notification settings - Fork 1
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
DCMAW-10829: Enhances http request retry strategy with exponential backoff and full jitter #344
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jmooney-dd
changed the title
Dcmaw 10829 retry delay
DCMAW-10829: Enhances http request retry strategy
Jan 17, 2025
jmooney-dd
force-pushed
the
DCMAW-10829-retry-delay
branch
from
January 17, 2025 18:18
7a11773
to
cb1e74c
Compare
jmooney-dd
commented
Jan 17, 2025
backend-api/src/functions/services/http/tests/sendHttpRequest.test.ts
Outdated
Show resolved
Hide resolved
jmooney-dd
commented
Jan 20, 2025
backend-api/src/functions/asyncBiometricToken/getBiometricToken/getBiometricToken.ts
Outdated
Show resolved
Hide resolved
jmooney-dd
commented
Jan 20, 2025
jmooney-dd
changed the title
DCMAW-10829: Enhances http request retry strategy
DCMAW-10829: Enhances http request retry strategy exponential backoff and jitter
Jan 20, 2025
jmooney-dd
changed the title
DCMAW-10829: Enhances http request retry strategy exponential backoff and jitter
DCMAW-10829: Enhances http request retry strategy with exponential backoff and jitter
Jan 20, 2025
jmooney-dd
changed the title
DCMAW-10829: Enhances http request retry strategy with exponential backoff and jitter
DCMAW-10829: Enhances http request retry strategy with exponential backoff and full jitter
Jan 20, 2025
…ture to return response body in errorResult
Quality Gate passedIssues Measures |
chris-cooksley-gds
approved these changes
Jan 20, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DCMAW-10829
What changed
Why did it change
Exponential backoff
Reduces load on target server giving it time to recover while gradually increasing the interval between retries
Full jitter
Prevents synchronised retries which can overwhelm the target server by altering the delay between retries by a random amount
Sonar security hotspot
Status
Resolved - Akin has resolved the hotspot: https://gds.slack.com/archives/C060PANF03T/p1737366725133829
Summary
Sonar flagged that we are using a pseudorandom number generator and asks we check it's safe to use here. We are using it to calculate a jitter value.
Link to hotspot
Evidence
Deployed stack and ran
api
tests - all passingChecklists