用于 HA 文件存储的 MongoDB GridFS
我正在开发一个项目,需要存储许多用户上传的文件并提供冗余。对于文件上传,我首先考虑将用户上传的文件放在 NFS“上传”目录中,并使用 Gearman 抓取文件,将其移动到永久存储位置,然后使用文件信息(文件大小、日期... ETC)。
现在我已经了解了 MongoDB 的 GridFS,我认为这可能是比 NFS 和 GridFS 更好的方法。齿轮曼。使用 GridFS,我不需要 NFS,而且冗余是内置的 - 但我会非常信任 MongoDB。
说了这么多,我想知道是否有人有任何想法?有人知道 GridFS 的大规模部署吗?我知道很多人都在使用 MongoDB 进行 NoSQL,但我还没有找到很多关于 GridFS 部署的参考。
谢谢!
I am working on a project where I need to store many user uploaded files and provide redundancy. For file uploads, I was first considering to place user uploaded files in a NFS "uploads" directory and use Gearman to grab the file, move it to it's permanent storage locations, then update MySQL with the files info (filesize, date...etc).
Now that I have learned of MongoDB's GridFS, I am thinking this may be a better approach than NFS & Gearman. With GridFS, I don't need NFS and the redundancy is built in - but I would be putting a lot of trust into MongoDB.
With this all said, I was wondering if anyone had any thoughts? Does anyone know of a large deployment of GridFS? I know many people are using MongoDB for NoSQL, but I have not found many references to GridFS deployments.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们正在将 GridFS 用于我们的一个项目。我还使用 gearman 来分发作业队列,以便客户端不必等待文件完成上传。一旦用户点击提交,php 就会将作业发送给 gearman,然后我就有“工作人员”来执行插入到 MongoDB 的操作。
We're using GridFS for one of our projects. I'm also using gearman to distribute the job queue so that clients don't have to wait for a file to finish uploading. Once the user hits submit, php sends the job to gearman and then I have "workers" that do the inserting into MongoDB.
您还可以查看 MogileFS,这是一个分布式存储系统。
You can also check out MogileFS, which is a distributed storage system.