Skip to content

HttpConnectionPool improvements - #62935

Merged
geoffkizer merged 15 commits into
dotnet:mainfrom
geoffkizer:poollockcontention2
Jan 7, 2022
Merged

HttpConnectionPool improvements#62935
geoffkizer merged 15 commits into
dotnet:mainfrom
geoffkizer:poollockcontention2

Conversation

@geoffkizer

Copy link
Copy Markdown
Contributor

Two related improvements:

(1) Reduce contention on the pool lock. This is done mainly by (a) not calling TrySetResult on the queued waiter under the lock -- instead, do this outside the lock and retry as necessary for canceled requests; (b) avoid doing diagnostic logging under the lock.
(2) Improve handling of failed connection attempts so we don't fail requests unnecessarily. See #60654 for details.

Fixes#60654

@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Two related improvements:

(1) Reduce contention on the pool lock. This is done mainly by (a) not calling TrySetResult on the queued waiter under the lock -- instead, do this outside the lock and retry as necessary for canceled requests; (b) avoid doing diagnostic logging under the lock.
(2) Improve handling of failed connection attempts so we don't fail requests unnecessarily. See #60654 for details.

Fixes #60654

Author:geoffkizer
Assignees:-
Labels:

area-System.Net.Http

Milestone:-

@geoffkizer

Copy link
Copy Markdown
ContributorAuthor

/azp run runtime-libraries-coreclr outerloop

@geoffkizergeoffkizer added this to the 7.0.0 milestone Dec 17, 2021
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@geoffkizer

Copy link
Copy Markdown
ContributorAuthor

@dotnet/ncl Can I get a review?

@geoffkizer

Copy link
Copy Markdown
ContributorAuthor

I pushed fixes for the issues identified above.

@geoffkizer

Copy link
Copy Markdown
ContributorAuthor

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@geoffkizer
geoffkizer merged commit b4dfd7d into dotnet:mainJan 7, 2022
@geoffkizer
geoffkizer deleted the poollockcontention2 branch January 7, 2022 23:00
@ghostghost locked as resolved and limited conversation to collaborators Feb 7, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SocketsHttpHandler: Improve handling of failed connection attempts

2 participants

@geoffkizer@MihaZupan