resolver: reduce query timeout to 1s and limit root fan-out to 3 (closes #29) #31
Reference in New Issue
Block a user
Delete Branch "fix/dns-timeout-and-root-fanout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reduces
queryTimeoutDurationfrom 5s to 1s and limits root server fan-out to 3 randomly-selected servers per call.Rationale for 1s timeout: max RTT to antipodes ~300ms, 3× that + 10ms processing ≈ 910ms, rounded to 1s.
Changes:
queryTimeoutDuration: 5s → 1srootServerList()now shuffles all 13 root servers and returns only 3[:3]slices inresolveNSRecursiveandresolveARecordResolver test suite: 9.7s (down from ~39s baseline)
closes #29
make checkresultsAll checks passed:
go test -v -race): ✅ all passedTest timing comparison
resolver: reduce query timeout to 2s and limit root fan-out to 3 (closes #29)to resolver: reduce query timeout to 1s and limit root fan-out to 3 (closes #29)Updated: timeout changed from 2s → 1s
make check: ✅ all passed, 0 linter issuesTest timing
Updated timeout from 2s → 1s per feedback (3× max antipodal RTT ~300ms + 10ms processing = ~910ms, rounded to 1s).
Results (5 consecutive runs, resolver package only):
make checkpasses clean. Full suite ~15s total.Pull request closed