What is the exact difference between mongod and mongos

前端 未结 4 1679
孤城傲影
孤城傲影 2021-02-05 01:32

While I was looking into the MongoDB documentation, I found two different terms mongod and mongos.

While starting the server, I am using

相关标签:
4条回答
  • 2021-02-05 01:55

    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

    0 讨论(0)
  • 2021-02-05 02:10

    In shard clusters, mongod as a shard data process and store shard metadata process. mongos as a route process to manipulate client request.

    0 讨论(0)
  • 2021-02-05 02:17

    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/

    0 讨论(0)
  • 2021-02-05 02:18

    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.

    0 讨论(0)
提交回复
热议问题