Reputation: 8557
To increase performance for MongoDB, sharding the database is rather necessary. However, all connections and queries go through a 'mongos' (MongoDB router).
The MongoDB router is the only one in the sharding architecture, could that be a bottleneck and break down the whole sharded cluster?
Upvotes: 1
Views: 382
Reputation: 14480
The MongoDB router is the only one in the sharding architecture
You can (and should) run multiple mongos
nodes. mongos
can be colocated on the servers that run mongod
s, and in fact this is a common deployment strategy, because mongos
have relatively low resource requirements. That said, if the server overall is experiencing resource issues (for example, high network load, or a large number of files open), then mongos
could be affected even though the load may have originated elsewhere (such as in the mongod
running on the same machine).
could that be a bottleneck
mongos
is generally quite efficient, though you should test it for your particular requirements.
and break down the whole sharded cluster?
A single mongos
instance is a single point of failure, which is why a production deployment should have multiple mongos
instances running.
Upvotes: 1