In my test. use
$mongo = new MongoClient("mongodb://192.168.1.110:27017");
only take 1ms to connect the mongo PRIMARY.
But when I use
$mongo = new MongoClient("mongodb://192.168.1.110:27017,192.168.1.110:27018,192.168.1.110:27019/?replicaSet=test");
it will take 5ms. The cost is five times as long as the previous one.
How should I choose?