Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2477

Replace HttpClientHandler with SocketsHttpHandler

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.2.4
    • library
    • None
    • 1

    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  

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            Richard Ponton

            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

            btburnett3 Brant Burnett added a comment - Richard Ponton 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

            This was completed along with other work in NCBC-2989

            btburnett3 Brant Burnett added a comment - This was completed along with other work in NCBC-2989

            People

              Unassigned Unassigned
              arun.vijayraghavan Arun Vijayraghavan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty