fix(node-sdk): increase default get timeout to 10s, add 3 retries#388
Merged
fix(node-sdk): increase default get timeout to 10s, add 3 retries#388
get timeout to 10s, add 3 retries#388Conversation
get timeout to 10s, add 3 retriesget timeout to 10s, add 3 retries
get timeout to 10s, add 3 retriesget timeout to 10s, add 3 retries
pavkam
reviewed
Mar 26, 2025
Contributor
pavkam
left a comment
There was a problem hiding this comment.
Approving but we should use some off the shelf policy management library that offers the retry timeout and back off stuff
Contributor
Author
thanks! I took a quick look to try and find an appropriate library. Wanted:
I didn't find anything immediately and this fixes a current issue for customers so I'll go ahead and merge, making a mental note to be on the lookout for an appropriate library to replace our own implementation. |
pavkam
approved these changes
Mar 26, 2025
This file contains hidden or 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
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.
Our HTTP API responds to
/featurerequests in less than 5ms, but there are cases where the network on the client could be dodgy or there's otherwise some delay. Especially when the program is just starting up this is problematic because the NodeSDK will use the fallback flags which for the most part are empty.This introduces a configurable timeout and default the timeout to 10s instead of the existing 5s. It also adds an exponential retry which is set to 3 tries by default.