Should I be using a separate server for hosting images that are created on a website?

For example, my application creates images and currently stores them on the same server. I have around 200k+ photos that are small in size, but are all stored on the same server as the application code. Are there any performance or security issues?

I can't use S3 because S3 lowers the quality of the image which doesn't work with my application.


The disadvantage would be if your server is slow or your connection is slow. If both are fast then, no, you don't need a separate server.

Your server can get bogged down, even with small files, if you get a lot of random requests for different files and it doesn't have enough memory to keep it all in cache. Even Gigabytes of ram won't help if your internet connection is slow. Even two servers won't help if either is slow.

Sometimes it helps to have separate servers in a CDN fashion where your users are closer to a CDN server but, again, that's only if you have high traffic.

Those are the main considerations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.