I use gridfs to work on one of our servers, which is part of a site comparing prices with honorable traffic statistics (about 25,000 visitors per day). There are not many bars, 2 gigs on the server, and even the processor is not very fast (Core 2 Duo 1.8Ghz), but the server has enough storage space: 10Tb (sata) in the raid 0 configuration. The work performed by the server is very simple:
Each product of our price comparator has an image (about 10 million products in accordance with our db product), and working with servers consists in uploading an image, resizing it, storing it on gridfs and delivering it to the visitors browser ... if it is not present in to the grid ... or ... delivers it to the visitors browser if it is already stored in the grid. Thus, this could be called a "traditional cdn scheme."
We have saved and processed 4 million images on this server since its launch and launch. The size and contents of the repository is done with a simple php script ... but for sure, a python script or something like java can be faster.
Current data size: 11.23g
Current storage size: 12.5 g
Indexes: 5
Index Size: 849.65m
About reliability: It is very reliable. Server does not load, index size is OK, requests are fast
About speed: for sure, it is not as fast as local file storage, maybe 10% slower, but fast enough to be used in real time, even when the image needs to be processed, which in our case is very dependent on php. Reduced time maintenance and development: it has become so easy to delete one or more images: just request db with a simple delete command. Another interesting thing: when we rebooted our old server with local file storage (there are so many files in thousands of folders), it sometimes freezes for hours because the system performed file integrity checks (it really took hours ...). We no longer have this problem with gridfs, our images are now stored in large chunks of mongodb (2gb files)
So ... in my opinion ... Yes, gridfs is fast and reliable to be used for production.
Manu Eidenberger Apr 11 2018-11-11T00: 00Z
source share