Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4558

Investigate NODE-4557 - MongoDB reads are not balance with 2 members selected

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • 1
    • Not Needed

      NODE-4557 Description

      What problem are you facing?

      When using Node.js driver versions >4.6.x in a configuration with readPreference: nearest and readPreferenceTags resulting in 2 eligible members to read from, the reads are unbalanced between the two members.

      For example if there are 1000 queries/second in total, in drivers version <4.6.x, the first members gets ~500 queries/second and second members gets ~500 queries/second. In versions >4.6.x, the second member always is preferred, getting ~750 queries/second where the first member only gets the ~250 queries/second.

      The issue seems to fix when there are 3 or more members eligible, the queries and load on all members becomes balanced.

      What driver and relevant dependency versions are you using?

      Node.js driver >4.6.x

      Steps to reproduce?

      Create a Mongo cluster setup with tags. From Node.js driver select only 2 members using readPreferenceTags and readPreference: nearest.

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: