Results 1 to 6 of 6

Thread: Best solution for serving images on webserver

  1. #1
    Join Date
    Jul 2006
    Location
    Horten, Norway
    Beans
    36
    Distro
    Ubuntu 10.04 Lucid Lynx

    Best solution for serving images on webserver

    Hi! I'm to set up a server for hosting only images.It's about 2 million small images, ranging from 10k to 1mb. What is the best setup on a ubuntu server for this?

    Should I use:

    apache or lighttp?

    any suggestions on caching? etc..

    Appreciate any help on this matter.

    Ps: allso, should i use SSD disk for best performance on files like these, or just depend on cache images in the server memory?
    Last edited by tep200377; January 27th, 2013 at 03:04 PM.
    Damn, it sucks to be a n00b!

  2. #2
    Join Date
    Sep 2006
    Beans
    7,193
    Distro
    Lubuntu Development Release

    Re: Best solution for serving images on webserver

    If you're looking at Apache, then I would read up on mod_expires and mod_cache.

    There is also a third option for web servers, nginx. It is the smallest and lightest.

  3. #3
    Join Date
    Jun 2011
    Beans
    315

    Re: Best solution for serving images on webserver

    Since you're only hosting images, not dynamic content, then I don't think it will make a whole lot of difference which web server you use. Any web service with caching should do the trick just fine.

  4. #4
    Join Date
    Sep 2011
    Location
    London
    Beans
    Hidden!

    Re: Best solution for serving images on webserver

    Quote Originally Posted by tep200377 View Post
    Hi! I'm to set up a server for hosting only images.It's about 2 million small images, ranging from 10k to 1mb. What is the best setup on a ubuntu server for this?

    Should I use:

    apache or lighttp?

    any suggestions on caching? etc..

    Appreciate any help on this matter.

    Ps: allso, should i use SSD disk for best performance on files like these, or just depend on cache images in the server memory?
    Hi

    If you're new to this, my recommendation would be to use the most ordinary configuration first, and only become more exotic if you find it doesn't work out how you need it.

    In this particular situation, I'd recommend a completely stock 10.04 or 12.04 server, tick 'LAMP server' during installation, and see how you get on with a straight Apache installation.

    With 2 million images, I'd pay a little attention to your file structure -- you don't want 2 million files in one directory. Without knowing more about your application it's hard to give more than general advice, but a tree of directories organised to give about 1000 images in the bottom directory is pretty usual: 00/11/22/filename.jpg or 2010/01/01/filename.jpg for example.

    Who are you serving to? I wouldn't worry about SSD versus hard disk until you have something working.

    Hope that helps.

    Kind regards,
    Jonathan.

  5. #5
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    7,822
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Best solution for serving images on webserver

    If you want comments, the ability to add photos, and other plug-ins, then you are looking for a content management system such as http://drupal.org. I agree, I wouldn't use an SSD because your internet bandwidth will be much slower than any disk drive you use. CPU and RAM may be important depending on how many simultaneous users you expect to be pulling photos from the site.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  6. #6
    Join Date
    Apr 2012
    Beans
    65
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Best solution for serving images on webserver

    You should consider using CDN if you have a high traffic website.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •