-1

What are the key differences among :

  1. mongo
  2. mongos
  3. mongosh
  4. mongod

I've tried many websites but didn't get clear explanations for these.

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
balajirai
  • 19
  • 2

1 Answers1

1

Server side binaries:

  • mongos is a router for sharding. It will be used if your server is configured as sharded.
  • mongod is a particular server. Can be used alone (not recommended for production) or as part of replica set.

Client side binaries:

  • mongo is a legacy shell to query server
  • mongosh is a modern shell to query server
dododo
  • 3,872
  • 1
  • 14
  • 37
  • In MongoDB installer package I got only mongos and mongod. Now for running mongodb commands which one is recommended "mongo" or "mongosh" ? – balajirai Mar 23 '23 at 14:08
  • 1
    mongosh, see https://stackoverflow.com/questions/73081708/mongo-exe-not-installed-in-version-6-0-0/73084403#73084403 – dododo Mar 23 '23 at 14:15