Repository navigation
[8.0.0 Cherry-pick] Don't wait in SniTcpHandle.CheckConnection - #5099
Merged
Merged
Conversation
* Don't wait in SniTcpHandle.CheckConnection The liveness check polled the socket with a 100 µs timeout. On a healthy, idle connection the poll waits the whole timeout, and Windows rounds it up to the system timer tick (15.6 ms by default), so every open from the pool over TCP with the managed network layer cost about 15 ms once the connection had been idle longer than CheckConnectionWindow. A connection closed by the peer is already readable, so a zero timeout detects it just the same; SelectRead and the Available check stay as they were for Linux. * Measure an idle pooled checkout as a benchmark instead of a unit test The liveness probe runs only on a connection that has been idle for more than 5 ms, and a successful probe restarts that window, so the churn runner probes at most one checkout in every 5 ms and averages its cost away. ConnectionPoolIdleCheckoutRunner leaves a one-connection pool idle for 10 ms outside the measurement, then times a single open, sync and async, so every measured checkout pays for the probe. With managed SNI on Windows it reads about 13.5 ms per checkout with Poll(100) and about 0.2 ms with Poll(0). The timing assertion leaves the unit tests, which keep the peer-closed case. * Explain the zero poll timeout as a best-effort health snapshot --------- Co-authored-by: Rocco Panunzio <222559735+RoccoPanunzio@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
/azp run |
mdaigle
enabled auto-merge (squash)
November 17, 2026 20:22
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. |
cheenamalhotra
approved these changes
Nov 17, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/8.0 #5099 +/- ##
===============================================
+ Coverage 68.97% 69.96% +0.99%
===============================================
Files 314 313 -1
Lines 45857 69736 +23879
===============================================
+ Hits 31629 48790 +17161
- Misses 14228 20946 +6718
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Cherry-pick of #5071 (c58251e) into
release/8.0.