Accessing unsharded database in a MongoDB shard cluster without going through mongos?
Mongo will happily let you directly access any database on any individual node you hit. If that database is sharded, you can still access it but will only get results from that shard. This also means that you can have unsharded databases on a node and it'll return results from that unsharded database.

Yes, it is safe to directly access the replicaset members for that unsharded database.

It's also possible to do it through the MongoS process same as the sharded access. This may make code-paths easier, though it does add a bit of latency to the entire call.




Database is a feature of Nodes.
Sharding is a feature of Databases.
Replica status is a feature of Databases.
MongoS and Config servers represent the management layer needed to do Sharding.


A database that is not sharded does not need MongoS or Config, and can be directly accessed safely.