I searched everywhere on the Internet to compare stored images in the Heroku PG-SQL SDK and save them on Amazon S3. Im currently trying to make a design decision. However, this is the first time I am writing a web application. So far this is what I know to make a decision:
- Saving images to the database slows down application performance
- Saving images to Db is expensive compared to the file system.
- You cannot access the file system in Heroku
- You can save images to Amazon S3 at a very low cost.
- Images stored on Amazon S3 cannot be processed until saved if they do not go through the application on Heroku
- Getting and saving images on Amazon S3 costs money for every call.
- If the browser retrieves an object with an image, the browser makes 2 requests for the object, 1 for data from the hero, and the other for S3 for the image. This can be problematic as the browser can only execute certain> m.unt requests per unit of time.
- Saving images in the database, if the images are small in size, does not significantly degrade performance.
- Removing images from the database can lead to fragmentation
This is the fact that I know about the topic. Now the situation is standing, Im tends to save images in Heroku database. Since they are mainly thumbnails / small images and their size is less than 250 MB
I was wondering if anyone could tell me if these facts are erroneous or if there are other considerations that I need to make when making such a design decision.
Also, I would really appreciate it if someone could point me to some good online discussions on this topic. I could not find anything that was in this discussion.
source share