mongoose - MongoDB Loadbalancer is not working as execpted -
i have multiple mongos in below uri. mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostn[:portn]]][/[database][?options]]
mongodb://username:password@host123:40000,host124:40000,host124:40000/admin?ssl=true
we created mongoclient , try read value collection, prints
system.out.println("server address: " + mongoclient.getaddress()); system.out.println("connection point: " + mongoclient.getconnectpoint());
it returning host123, not working round robin. changes required in connection uri?
mongodb use hostn
fall on redundancy, if want deploy load balancing you'll have deploy own load balancer mix.
Comments
Post a Comment