Mongos()

Constructor

Mongos constructor provides a connection to a mongos proxy including failover to additional servers

class Mongos()
Arguments:
  • list (array) – of mongos server objects
  • [options] (object) – additional options for the mongos connection
Options
  • socketOptions {Object, default:null}, an object containing socket options to use (noDelay:(boolean), keepAlive:(number), connectTimeoutMS:(number), socketTimeoutMS:(number))
  • ha {Boolean, default:true}, turn on high availability, attempts to reconnect to down proxies
  • haInterval {Number, default:2000}, time between each replicaset status check.