Image Server for WebApp... questions about how to serve images

TechBoyJK

Lifer
Oct 17, 2002
16,701
60
91
I'm building an app, and I'm trying to decide on the best way to manage hosting photos that would be uploaded.

The app is hosted on a CentOS vm named WWW01.

My current plan is to have a standalone CentOS box called 'IMAGES01' on the same private network with a folder /images shared via NFS and mounted as /images01 on the webserver (WWW01). With that, any uploads through the webapp will end up on the image server.

In order to serve the images, I'm trying to decide between hosting them back through the webserver, or hosting them directly from the imageserver. It seems like it would be more efficient to use apache to host the images directly off the image server.

Thoughts?
 

TechBoyJK

Lifer
Oct 17, 2002
16,701
60
91
Wouldn't it be better to have it hosted on the same server? Seems overkill to have 2.

Good question. Let me explain why I'm planning things this way.

It's for growth. There will be multiple web servers for load and redundancy.

The app is coded to allow for multiple image servers as well. By keeping the images on a separate server, images uploaded through the app don't need to be reconciled among the different web servers. They will all hit a single, central image repository. And I can also have multiple repositories by just setting up a new image server (IMAGES02, IMAGES03). My app will keep track of which imageserver an image is on, and include that info when retrieving and publishing the image.

aka. I could have 20 different instances of the webapp running on the cloud, and if I hosted directly, they'd all need to have copies of the images and keep it in sync. That's 20 copies of each image. That'd actually be overkill.

Make sense?
 
Last edited:

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,282
3,904
75
Serving files off NFS doesn't seem like a good idea to me. That just means both servers have to do work. I'd think you'd want to serve the files directly off separate servers. At some point, you might want to move the files to a Content Delivery Network, or CDN, and then you'd definitely want the files on separate servers.
 

MrColin

Platinum Member
May 21, 2003
2,403
3
81
Serving files off NFS doesn't seem like a good idea to me. That just means both servers have to do work. I'd think you'd want to serve the files directly off separate servers. At some point, you might want to move the files to a Content Delivery Network, or CDN, and then you'd definitely want the files on separate servers.

I have to agree with this. You are only introducing more load on the app server by making it serve both the http request and mounting/using the NFS share. I guess the work of integrating whatever access control between the app server and the content server could be avoided with the NFS approach though.
 

hooflung

Golden Member
Dec 31, 2004
1,190
1
0
If they are on the same physical machine serving over a share folder adds protocol overhead that just isn't needed. For instance if a VM vendor, or a personal cloud stack, might run virtual images off of iSCSI then there is no reason you 'd want to NFS between your vm's which are already running on top of another filesystem (hopefully zfs) which might already be implementing NFS.

HTTP static content is probably the best bet. Nginx it out.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |