Repository navigation
Cap lookup time across fallback drivers - #412
Merged
Merged
Conversation
Contributor
Author
|
Hey @stevebauman, any chance you could take a look at this when you have a moment? No rush. Heads up that CI hasn't run yet, it needs an approval since it's my first PR here. |
Contributor
Author
|
Hello! Bumping this one. Either way, tell me what shape works and I'll rework it. |
tegos
force-pushed
the
fix/lookup-timeout-budget
branch
from
October 3, 2026 13:40
1c0f306 to
1420d1c
Compare
Contributor
Author
|
Trimmed this down to just the timeout budget. Dropped the failure event, CI needs your approval to run. |
stevebauman
reviewed
Oct 5, 2026
Owner
|
Released in v7.7.0! |
Contributor
Author
|
Thanks, no problem about delay. Now we can limit the total time. With a few fallback drivers, one dead provider made the request wait for all their timeouts. |
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.
Closes #182.
http.timeoutis per driver, not per lookup. With the shipped config (IpApiplus four fallbacks) an unreachable provider costs that timeout five times over, soLocation::get()in #182 returnedfalseafter ~16s withtimeout => 3. Reproduced against a socket that accepts but never responds: 14.02s currently, 4.05s withtotal_timeout => 4.total_timeout(defaultnull, so nothing changes unless set) gives the whole lookup one budget. Each driver's timeout is capped to what's left, and drivers with no time left aren't called.I dropped the failure event that was here before to keep this focused on the timeout.
Your call:
total_timeoutdefaults tonullfor compatibility, which means #182's config still takes ~15s. Happy to default it to a number instead.