Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3163

Performance degradation when using mongodb+srv

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Connectivity
    • None

      We recently switched our applications from using mongbd schema to the mongodb+srv and noticed significant performance degradation.

      Simple performance test shows the following:
      8 threads, 400 iterations
      mongodb+srv :

      44.8375ms connect time
          44.625ms get client time
          0.045ms get database time
          0.1ms get collection time
      29.5575ms request execution time
      

      mongodb:

      3.7175ms connect time
          3.5325ms get client time
          0.01ms get database time
          0.16ms get collection time
      23.8675ms request execution time
      

      We are creating new instance of MongoClient for each request and the majority of time is spend on the client creation.

      VS profiler shows that almost all time was spend on DnsClient.LookupClient constructor

            Assignee:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Reporter:
            andrei_stryia@epam.com Andrei Stryia
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: