Hi Robert,
You can run mongos
on more than one machine in order to scale out of limitation of a single machine running mongos
. You could then configure your clients to connect to different mongos
to distribute the load. The number of mongos
to use depends on your use case and the best the way to figure that is to perform load testing on your deployment.
Although not specific to load balancing, some officially supported drivers implement the The Server Selection Specification, which will choose a server (mongod
or mongos
) using random selection within the latency window given a list of servers to connect to in the Connection String. Please see Server Selection in Next Generation MongoDB Drivers for more details.
For more information, you can check: Sharding, mongos
and MongoDB Performance Best Practices.
Regards,
Amar