Storing Images: MongoDb vs File System

前端 未结 2 1551
既然无缘
既然无缘 2021-02-05 09:42

I need to store a large number of images (from around 10,000 images per day) With an average size of around 1 to 10 MB for each image.

I can store these images in MongoD

2条回答
  •  离开以前
    2021-02-05 10:09

    Implementing queries and operations on the file objects being saved is easier with GridFS. In addition, GridFS caters for backup/replication/scaling. However, serving the files is faster using Filesystem + Nginx than GridFS + Nginx(look here: https://www.coffeepowered.net/2010/02/17/serving-files-out-of-gridfs/). GridFS 'slower' serving speed can however be leveraged when sharding is used

提交回复
热议问题