-
Notifications
You must be signed in to change notification settings - Fork 16
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
Pool DoT connections #105
Comments
# with pooling (retrier only has one outgoing packet corresponding to one DNS query)
➜ firestack git:(n2) ✗ go clean -testcache && go test -timeout 30s -run ^TestDot$ github.com/celzero/firestack/intra/dns53 -v | grep -iE "(pool|retrier)"
retrier.go:220: D retrier: dial(SplitAuto,RetryAfterSplit,) 10.1.204.199:44998->213.188.216.9:853; strat: 1, rtt: 39ms; err? <nil>
retrier.go:357: I retrier: write: first?(true) [10.1.204.199:44998=>213.188.216.9:853] 1490; 1st write-err? <nil>
retrier.go:289: V retrier: read: [10.1.204.199:44998<=213.188.216.9:853] 576; err: <nil>
retrier.go:289: V retrier: read: [10.1.204.199:44998<=213.188.216.9:853] 2864; err: <nil>
retrier.go:289: V retrier: read: [10.1.204.199:44998<=213.188.216.9:853] 626; err: <nil>
dot.go:221: V dot: pool: (test0) put for 824634754688; ok? true
connpool.go:245: D pool: 10.1.204.199:44998=>213.188.216.9:853 readable? true; err? <nil>
connpool.go:163: D pool: 824634754688 get: empty? false, timedout? false
dot.go:239: V dot: pool: (test0) got conn from 824634754688; 1
retrier.go:289: V retrier: read: [10.1.204.199:44998<=213.188.216.9:853] 141; err: <nil>
dot.go:221: V dot: pool: (test0) put for 824634754688; ok? true
connpool.go:245: D pool: 10.1.204.199:44998=>213.188.216.9:853 readable? true; err? <nil>
connpool.go:163: D pool: 824634754688 get: empty? false, timedout? false
dot.go:239: V dot: pool: (test0) got conn from 824634754688; 2
retrier.go:289: V retrier: read: [10.1.204.199:44998<=213.188.216.9:853] 201; err: <nil>
dot.go:221: V dot: pool: (test0) put for 824634754688; ok? true
connpool.go:245: D pool: 10.1.204.199:44998=>213.188.216.9:853 readable? true; err? <nil>
connpool.go:163: D pool: 824634754688 get: empty? false, timedout? false
dot.go:239: V dot: pool: (test0) got conn from 824634754688; 3
retrier.go:289: V retrier: read: [10.1.204.199:44998<=213.188.216.9:853] 273; err: <nil>
dot.go:221: V dot: pool: (test0) put for 824634754688; ok? true
# without pooling (retrier consumes 2x bandwidth; 2 outgoing packets per DNS query)
➜ firestack git:(n2) ✗ go clean -testcache && go test -timeout 30s -run ^TestDot$ github.com/celzero/firestack/intra/dns53 -v | grep -iE "(pool|retrier)"
retrier.go:220: D retrier: dial(SplitAuto,RetryAfterSplit,) 10.1.204.199:36782->213.188.216.9:853; strat: 1, rtt: 40ms; err? <nil>
retrier.go:357: I retrier: write: first?(true) [10.1.204.199:36782=>213.188.216.9:853] 1490; 1st write-err? <nil>
retrier.go:289: V retrier: read: [10.1.204.199:36782<=213.188.216.9:853] 576; err: <nil>
retrier.go:289: V retrier: read: [10.1.204.199:36782<=213.188.216.9:853] 2865; err: <nil>
retrier.go:289: V retrier: read: [10.1.204.199:36782<=213.188.216.9:853] 542; err: <nil>
retrier.go:289: V retrier: read: [10.1.204.199:36782<=213.188.216.9:853] 84; err: <nil>
retrier.go:220: D retrier: dial(SplitAuto,RetryAfterSplit,) 10.1.204.199:36794->213.188.216.9:853; strat: 1, rtt: 43ms; err? <nil>
retrier.go:357: I retrier: write: first?(true) [10.1.204.199:36794=>213.188.216.9:853] 1761; 1st write-err? <nil>
retrier.go:289: V retrier: read: [10.1.204.199:36794<=213.188.216.9:853] 225; err: <nil>
retrier.go:289: V retrier: read: [10.1.204.199:36794<=213.188.216.9:853] 141; err: <nil>
retrier.go:220: D retrier: dial(SplitAuto,RetryAfterSplit,) 10.1.204.199:36810->213.188.216.9:853; strat: 1, rtt: 42ms; err? <nil>
retrier.go:357: I retrier: write: first?(true) [10.1.204.199:36810=>213.188.216.9:853] 1761; 1st write-err? <nil>
retrier.go:289: V retrier: read: [10.1.204.199:36810<=213.188.216.9:853] 225; err: <nil>
retrier.go:289: V retrier: read: [10.1.204.199:36810<=213.188.216.9:853] 201; err: <nil>
retrier.go:220: D retrier: dial(SplitAuto,RetryAfterSplit,) 10.1.204.199:36822->213.188.216.9:853; strat: 1, rtt: 44ms; err? <nil>
retrier.go:357: I retrier: write: first?(true) [10.1.204.199:36822=>213.188.216.9:853] 1761; 1st write-err? <nil>
retrier.go:289: V retrier: read: [10.1.204.199:36822<=213.188.216.9:853] 225; err: <nil>
retrier.go:289: V retrier: read: [10.1.204.199:36822<=213.188.216.9:853] 273; err: <nil>
|
ignoramous
referenced
this issue
Oct 20, 2024
unclear if timer.Ticker would force wake up and/or prevent sleep
ignoramous
referenced
this issue
Oct 20, 2024
ignoramous
referenced
this issue
Oct 20, 2024
reads from the chan are immediately written back in to it, and so the outer unconditional for-loop spins forever as the chan never runs out of elements.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For potential latency and bandwidth savings.
refs:
CheckConnLiveness
by default. go-sql-driver/mysql#1451 (comment)The text was updated successfully, but these errors were encountered: