0

I have several mongos instances. I have ruby and node.js application. I can put the hosts of all the mongos instances to mongodb connection URI. The ruby and node.js drivers can handle the failover. But can the two drivers do balancing between the multiple mongos instances? Why the document suggest us to make each application to only one mongos instance. Besize cursor issue, are there any other reasons? So can I put several mongos hosts into one URI?

Is there any example to set up a standalone load balancer for multiple mongos instances in production?

BAE
  • 8,550
  • 22
  • 88
  • 171
  • if you put multiple mongos in the connection URL it just means use the first one and if it goes away, aka fails then try the next one. So you would want to give both to both of your applications but in reverse order. – Asya Kamsky Jun 17 '15 at 21:28
  • Thanks for you reply. In this case, load balancer is not necessary. Drivers can do some balancing and failover. Is there any practical production example which use load balancer in front of a group of mongos instances? – BAE Jun 18 '15 at 13:36
  • it's generally not a good idea to use a load balancer in front of mongos unless you make the connections "sticky". – Asya Kamsky Jun 20 '15 at 06:06

0 Answers0