Confusion about passing poolSize option while connecting to mongodb using mongodb-native(mongoClient)

6 views
Skip to first unread message

Vijay Kanshi

unread,
Oct 20, 2018, 6:24:43 PM10/20/18
to node-mongodb-native
I am little bit confused for passing the poolSize for replicaSet or sharded system

1. const opt = {poolSize:2}
2. const opt = {replSet: {poolSize:2}}.

Which way is better to pass poolSize for replicaSet or sharded system . 1 or 2nd ??

let MongoClient = require('mongodb’).MongoClient;

MongoClient.connect(url, opt , function(err ,  opened_db) {


})

Reply all
Reply to author
Forward
0 new messages