mongod 和 mongos 之间的确切区别是什么 [英] What is the exact difference between mongod and mongos

查看:457
本文介绍了mongod 和 mongos 之间的确切区别是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我查看 MongoDB 文档时,我发现了两个不同的术语 mongodmongos.

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

在启动服务器时,我正在使用 ./mongod --dbpath 并且我正在运行 ./mongo 以连接到服务器.

While starting the server, I am using ./mongod --dbpath <path to mongodb> and I am running ./mongo to connect to the server.

有人可以澄清这两个术语之间的区别吗.

Can someone please clarify the differences between these two terms.

推荐答案

mongod 是守护进程,mongo 是客户端,mongos 是'MongoDB 分片实用程序'.看看man mongos:

mongod is the daemon, mongo is the client, mongos is the 'MongoDB Shard Utility'. Take a look at man mongos:

mongos 表示MongoDB Shard",是 MongoDB 分片配置的路由服务,它处理来自应用层的查询,并确定这些数据在分片集群,以完成这些操作.从应用程序的角度来看,mongos 实例的行为与任何其他 MongoDB 实例相同.

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.

这篇关于mongod 和 mongos 之间的确切区别是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆