Replace HttpClientHandler with SocketsHttpHandler

Description

Socket HttpHandler is the default implementation in .NET Core 2.1. SocketsHttpHandler class provides the implementation used by higher-level HTTP networking classes such as HttpClient.

Benefits

    Significant Performance Improvement.

    Consistent behavior across all .NET Platforms

    Can specify ConnectionTimeout  

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:

Brant Burnett November 1, 2021 at 9:20 PM

Brant Burnett October 22, 2021 at 9:24 PM

Based on my research, I don't think this change is necessary. Using HttpClientHandler on .NET Core 2.1 and later actually uses SocketsHttpHandler under the hood, unless overridden using an AppContext setting or environment variable. So we can continue to reference HttpClientHandler and get all the benefits of SocketsHttpHandler on platforms which support it, while still providing users with an option to fallback to legacy.

https://github.com/dotnet/corefx/blob/v3.1.21/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs#L17-L38

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created April 27, 2020 at 11:17 PM
Updated November 1, 2021 at 9:20 PM
Resolved November 1, 2021 at 9:20 PM
Instabug