views:

156

answers:

4

If too many images are being loaded from the server at once (or over a period of time) will it slow down the website for users?

What about saving images to the server?

Would a website that puts a lot of stress on the server makes the website more vulnerable to DOS attacks?

If our website needs to save and load mass amount of images, is there any way we can reduce server load to make sure that the website doesn't slow down?

Edit: Just for measurement sake, and this is probably over exagerating a bit but I just want to get an idea... lets say 10000 of images every hour, at a size of about 700kb - 1MB

A: 

How big are the images? How many will you be processing? This will put stress on the webserver and also will require bandwidth as well. As to the degree of stress, it is impossible to say without knowing more information.

If you want to reduce impact to your website then put the website on a separate server from the image processing server.

Andrew Hare
right... say thousands and... I would try to keep them as small as I can, but just to be safe 700kb
Matt
A: 

Serving images is not so much a CPU/storage demand as it is a bandwidth demand. You're unlikely to be able to afford enough bandwidth to serve enough images to bring a server down.

A reasonable solution I have seen implemented is using a separate media server, with the base URL configurable within your application or site. That way, you can negotiate a different rate for bandwidth from a different host somewhere else on the internet, without worrying if that host supports the technology you're using to develop your application. ASP.net web hosting tends to be far more expensive than vanilla linux hosting and requires more control over the server environment. Host your ASP.net application with Rich Guy Feature Hosting, LLC and your image server with Destitute Nerd Basic Hosting, Inc. since all it's doing is serving up dumb files.

You can also contact content caching providers like Akamai to host and cache your images for you. They distribute your images geographically, so that users get your images from a server physically closer to where they are.

Chris McCall
A: 

Loading images from a web server is basically no different from loading any other file from a web server; in that sense, yes, loading too many images could slow the server down, and/or lead to DOS, but not because you're working with images, but rather because you're reaching the maximum throughput of your web server. (The last time I played around with stressing an IIS web server, on a slow application, it could handle >160 requests / second; and would probably be able to do more if it were only loading static files)

If you are concerned about the load images cause on an application server, you could look into moving static content to a different server; say images.mydomain.com being on a different machine then mydomain.com.

One other note; if the images are all of the form of icons- generally of small size, you could look into a css sprite-sheet to go from, say, 20 image specific HTTP GET's to ~1.

Response to edit: 10,000 images /hr at 700k each would be about 2-3/sec (not accounting for variances), putting you into needing a few mbps of upload bandwidth. At that rate, you probably would want it on a different server; on a load balanced cluster; or on a CDN. At that rate, the overhead for CPU processing won't cause a DOS any faster, but bandwidth limitations might.

CoderTao
+2  A: 

You could try building a CDN ( Content Delivery Network ) of sorts. Point them to a server or servers for upload processing.

Process the files and replicate them to a cluster of file servers ( the CDN )

Then return a link to a CDN servers that only serve back the file.

Bonus Scenario:

Having your content being served from a different server than the one that processes the data allow you to take the processing server down, and still have the content server running.

BigBlondeViking