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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -