Here, Mongod is the server component. You start it, it runs, that's it. By definition we also call it the primary daemon process for the MongoDB database which handles data requests, manages data access, and performs background management operations. Whereas Mongo is a default command line client.
The mongos process, shown in the center of figure 1, is a router that directs all reads, writes, and commands to the appropriate shard. In this way, mongos provides clients with a single point of contact with the cluster, which is what enables a sharded cluster to present the same interface as an unsharded one.
You need mongos to route the queries and any write operations to the shard(s) as required. The mongos proxy is a map that your client can use to query or make changes in your cluster when your data is sharded.
exe is the build of the MongoDB Shard (i.e. mongos ) for the Windows platform. exe has all of the features of mongos on Unix-like platforms and is completely compatible with the other builds of mongos . In addition, exe provides several options for interacting with the Windows platform itself.
mongod
is the daemon, mongo
is the client, mongos
is the 'MongoDB Shard Utility'. Take a look at man mongos
:
mongos for "MongoDB Shard," is a routing service for MongoDB shard configurations that processes queries from the application layer, and determines the location of this data in the sharded cluster, in order to complete these operations. From the perspective of the application, a mongos instance behaves identically to any other MongoDB instance.
The core components in the MongoDB package are: mongod - the core database process; mongos - the controller and query router for sharded clusters; and mongo the interactive MongoDB Shell.
For more information http://docs.mongodb.org/manual/reference/program/
Mongos = MongoDB Shard Utility, the controller and query router for sharded clusters. Sharding partitions the data-set into discrete parts.
Mongod = The primary daemon process for the MongoDB system. It handles data requests, manages data access, and performs background management operations.
This explanation of mongo replication and sharding really helped me understand it: https://dba.stackexchange.com/a/53705/106925
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With