Conversation
- Add rttSlidingWindow struct using EWMA (alpha=0.125, beta=0.25, RFC 6298) - Add effectiveTimeoutSeconds() on Runner: returns dynamic timeout when DynamicTimeout=true and RTT samples exist, else falls back to fixed config - Record RTT sample in recv.go when DNS response arrives (statusDB.Get -> time.Since) - Use effectiveTimeoutSeconds() in retry.go instead of r.timeoutSeconds - Add DynamicTimeout bool to Options, commonFlags (--dynamic-timeout / -dt), enum.go, verify.go CLI wiring, and sdk.Config - Default: false (opt-in), preserving existing behaviour - Timeout upper bound = user --timeout, lower bound = 1s
… timeout - Remove Options.TimeOut and Options.DynamicTimeout fields - Remove SDK Config.Timeout and Config.DynamicTimeout fields - Remove --timeout and --dynamic-timeout CLI flags - Dynamic RTT timeout is now always enabled; upper bound hardcoded to rttMaxTimeoutSeconds=10s, lower bound rttMinTimeoutSeconds=1s - rttSlidingWindow initialized unconditionally in New() - recv.go: RTT sampling runs unconditionally (no DynamicTimeout guard) - effectiveTimeoutSeconds() now simply delegates to rttTracker - Update retry.go comment to reflect new design
- Add recvBackpressure int32 field to Runner (atomic flag) - In recv.go: monitor packetChan utilization in the reader goroutine; set recvBackpressure=1 when len>=80% (8000), clear to 0 when len<=50% (5000) - In send.go: sendBatch checks recvBackpressure and sleeps 5ms when set, allowing the recv pipeline (packetChan->dnsChan->resultChan) to drain instead of piling up and dropping packets - Also remove TimeOut from runner_test.go (field no longer exists)
- Remove the retryDomainCh channel + 4 worker goroutines (was: statusDB.Scan -> retryDomainCh -> worker -> domainChan -> sendCycle) (now: statusDB.Scan -> update statusDB -> send() directly, grouped by DNS server) - Group retried domains by DNS server in dnsBatches map; send each group consecutively to reduce pcap handle contention and per-call overhead - Pre-compute effectiveTimeoutSeconds() once per tick instead of per domain - Reuse items slice and dnsBatches map across ticks to reduce GC pressure - Skip recv-deleted domains: check statusDB.Get before updating retry state
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.
No description provided.