Where should I put the images for the Java app?

Chaklader Asfak Arefe :

I write an industry-grade Java API that provides you a few 100s JPEG images. The total size will be 15 MB which is not much. I believe that hosting the Java app due to this size is not an issue.

I think should I put the images inside the Java app or put in the cloud and read from there. What will be a better decision?

Ankur :

Ideal solution would be to have some sort of storage space like Amazon S3 cloud storage.

Benefits: 1. Central storage space : if wish to scale your application, each deployment would not have it's own copy of these files, that ultimately would avoid synch up problem across various deployment nodes.

  1. File additional/updation without app re-deployment : if you wish to change these files in near future, you don't have to re-build and deploy your application again on all the nodes/server, but rather just update your files in the cloud storage space. Thus also avoid app downtime.

So, you need to assess if you would need these benefits compared to the cost of having a storage space, and how likely is it that you would be scaling this app.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=311503&siteId=1