1

Currently we use mongoose to connect to out mongodb cluster. Out of 9 secondary servers in replica set, we're only passing 6 of secondary servers in connection string to a nodejs app. We're still seeing connections on remaining 3 secondary servers from nodejs app.

mongoose version: 5.13.14

mongo db version: 4.4.12

Here're the connection options specified

        bufferMaxEntries: 0,
        socketTimeoutMS: 0,
        keepAlive: true,
        reconnectTries: Number.MAX_VALUE,
        reconnectInterval: 1000,
        autoIndex: false,
        promiseLibrary: Promise,

Is there any configs which makes mongoose query mongo cluster to retrieve all secondary servers & then use one from retrieved list instead of given connection string??

apprentice
  • 11
  • 1

0 Answers0