Answer the question
In order to leave comments, you need to log in
Storing images in GridFS. Resize. What do you advise?
Hello.
There is a web application that must serve a fairly large flow of visitors.
The nginx + PHP + mongoDB bundle is used.
There was a problem with storing pictures and other files (size from 10kb to a couple of mb). Moreover, the photo needs to be resized (most likely, a miniature + resize. The original, I think, is not really needed).
Since the system will be distributed (sharding, replicas, etc.), the choice immediately fell on GridFS, which mongo carefully provides.
As a matter of fact, my questions are:
1) Is it optimal to use GridFS for this situation? How critical will the system sag with a large amount of files? I would like to receive up-to-date information, because GridFS is developing well.
2) What is the best way to resize? store both copies in FS or resize from the original when reading from the database (the idea, it seems to me, is not the best, but what the hell is not joking with)?
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question