Network bandwidth combination with sharded cluster

29 views
Skip to first unread message

Robert Thiel

unread,
Aug 17, 2016, 3:47:57 PM8/17/16
to mongodb-user
Hello,
as far as I understood mongos routes queries to shards and collects their results and delivers than back to the client. This implies that if I have only one machine with mongos its network bandwidth can limit the total bandwidth of the database.
I have multiple clients and each is requesting data consuming high network bandwidth. I'm looking for a solution that I'm not limited to the network bandwidth of the machine I'm running mongos on.

Do you have any suggestions?

Robert

Amar

unread,
Aug 24, 2016, 9:27:03 PM8/24/16
to mongodb-user

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


Reply all
Reply to author
Forward
0 new messages