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

Support HTTP response streaming in legacy .NET runtimes

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 3.4.13
    • None
    • library
    • None
    • 0

    Description

      Currently in .NET 4.x HTTP responses are never streamed. Instead, the deserialized objects are streamed after the full HTTP response body is read into a buffer by the HttpClient. This results in a higher time-to-first-result in .NET 4.

      This limitation is in place because:

      • Different behaviors around HttpClient.Dispose in .NET 4 may cause IOExceptions (see NCBC-3433)
      • HttpResponseMessage doesn't have a finalizer in .NET 4 so failure to dispose of the returned IQueryResult<T> (or similar) could cause HTTP connection leaks. When combined with the default limit of 2 connections per HTTP server in .NET 4 this could easily lead to outages.

      We should address our Dispose patterns to avoid the first problem and then provide a way for users to opt-in to HTTP streaming in .NET 4 if they are aware of the second problem and properly dispose of returned IQueryResult<T>, IViewResult<T>, and IAnalyticsResult<T> objects.

      https://www.couchbase.com/forums/t/streaming-result-of-queries/37043/8

      Attachments

        Issue Links

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

          Activity

            People

              btburnett3 Brant Burnett
              btburnett3 Brant Burnett
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty