-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
Empty show more show less
Hi,
I am experiencing very slow connection speeds using the node driver. This is occurring when trying to connect to our production replica set. 5 nodes, 1 is currently offline for a server rebuild (vm-mdb-01).
I have been using the code below to test connection speeds:
var Db = require('mongodb').Db,
MongoClient = require('mongodb').MongoClient,
Server = require('mongodb').Server,
ReplSetServers = require('mongodb').ReplSetServers,
ObjectID = require('mongodb').ObjectID,
Binary = require('mongodb').Binary,
GridStore = require('mongodb').GridStore,
Grid = require('mongodb').Grid,
Code = require('mongodb').Code,
BSON = require('mongodb').pure().BSON
console.log('Start')
console.time('connection');
MongoClient.connect("mongodb://vm-mdb-01:27017,vm-mdb-02:27017,vm-mdb-03:27017,vm-mdb-04:27017/contacts?w=1", function(err, db)
{ console.log('connected') console.timeEnd('connection'); db.close(); });
currently it takes 42 seconds to connect.
Could you give some pointers to how to locate the problem?
Cheers
Simon