简体   繁体   中英

What is best place to store and organize images for NOSQL database

I'm developing web application using parse.com where news content may have 20 images. what is best place to store images to avoid consequences in the future, like overloading database performance cost and such

1) store in NOSQL object type database 2) store in folder and save path pointers in NOSQL

what are pros and cons going each way?

Parse isn't a great choice for a content hosting provider because you will be pressing on the storage cap, not to mention limitations on bandwidth usage.

Use Parse as a general-purpose backend for user authentication and app data, then host the images on another service such as AWS Simple Storage Service (S3) and reference those resources using cloud code web hooks . In case you're wondering, Parse actually uses Amazon to host all of their infrastructure.

Another option could be to access the images directly using AWS API Gateway . Once you have the images stored in S3, you will be able to automatically create native client APIs for your project.

When you upload a file, it will be stored on the disk (that is how Parse works). In your database, you only store only a link to that file. Generally, your images will not necessarily be stored in one location or server. For the sake of scalability, you want to take advantage of Content Delivery Networks (CDNs) which could replicate your images to multiple servers across the world. Now no matter where your image is stored, you should be able to access it anywhere simply via a single link stored in your database.

You can store the path to the images within the database, but you want to store the actual images on S3 and access them via Cloudfront (CDN).

You can setup cloudfront in front of your S3 bucket and this will allow all your images to be accessed via AWS' CDN.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM