mongodb分布式存储的原理是什么?
怪我咯
怪我咯 2017-04-24 09:13:36
0
1
655

这两天刚开始学mongodb,试着建了分布式存储。

不明白他的基本原理是什么?

我的测试数据库:

weibo文档里有0.156G数据

建立了四个shard节点,发现每个节点的数据是平均分的,这是怎么实现分配的?

然后我把整个weibo清空,文件存储大小不变,为啥呢?

求高手解答。

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
PHPzhong

You need to first look at the basic principles of sharding in MongoDB. Here is a translated document by Xiao Beibei: http://docs.mongoing.com/manual-zh/core/sharding-introduction.html

Regarding point 2, MongoDB will not reclaim space in the file system after you delete the record. Unless you delete the database. But the space is not wasted and will be used to store the new document inserted below. For specific information on space usage, please see my blog: http://mongoing.com/blog/file-storage

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template