Mongodb – Can MongoDB manage balancing between the Mongos Dynamically using TCP Balancer

master-slave-replicationmongodbmongodb-3.4

If I have a business where I maintain 10 applications and I need to divide the request load of these 10 applications between 3 Mongos Dynamically.

Like the TCP Loadbalancer need to connect to MongoDB config servers and taking the Health status of 3 Mongos constantly and distributing the request load from application depending on the health state(getting to whether a particular Mongos is busy or free).

Is anything like the above can be achieved using TCP Balancer? or Its just can be used to configure the load static.

Please, confirm.

Best Answer

If those (10) applications are at own nodes (you have multiple application nodes), every node can have mongos installed, so application Connect's localhost mongos. Those mongos then connect's to your config servers and cluster.

You just use LB to distribute client load to those application servers.