<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments on: Best Web server program for a lot of static files?</title>
	<atom:link href="http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-static-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-static-files/</link>
	<description>A posting every day; an interesting idea every three months...</description>
	<lastBuildDate>Mon, 30 Nov 2009 23:44:43 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jesscor</title>
		<link>http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-static-files/comment-page-1/#comment-30476</link>
		<dc:creator>Jesscor</dc:creator>
		<pubDate>Tue, 21 Aug 2007 15:22:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-st#comment-30476</guid>
		<description>I tried lighttpd but I don&#039;t like the configuration file and in general how configure it, it is better than the crazy apache conf file but still not perfect, I am using MyServer now and I am much happier, I suggest it to eveyone who wants a fast and simple to use server</description>
		<content:encoded><![CDATA[<p>I tried lighttpd but I don&#8217;t like the configuration file and in general how configure it, it is better than the crazy apache conf file but still not perfect, I am using MyServer now and I am much happier, I suggest it to eveyone who wants a fast and simple to use server</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cmholm</title>
		<link>http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-static-files/comment-page-1/#comment-23747</link>
		<dc:creator>cmholm</dc:creator>
		<pubDate>Thu, 14 Jun 2007 01:21:31 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-st#comment-23747</guid>
		<description>thttpd: I&#039;ve been using it on Linux and OSX for years. Most of my traffic comes from Yahoo and Google bots sucking up my photos during indexing. 

nginx: I&#039;d like to get some dynamic content rendered faster, so I&#039;m playing with deploying it in front for static files, and using its url proxy feature to have it shoot the cgi/fastcgi/mod_whatever calls through to Apache.

lighttpd: I started to configure it for its fastcgi feature. However, many are the claims that it suffers significant memory leaks under heavy load. Of those making the claim but sticking with the product, the workaround was a cron job that reloaded the daemon at least nightly.</description>
		<content:encoded><![CDATA[<p>thttpd: I&#8217;ve been using it on Linux and OSX for years. Most of my traffic comes from Yahoo and Google bots sucking up my photos during indexing. </p>
<p>nginx: I&#8217;d like to get some dynamic content rendered faster, so I&#8217;m playing with deploying it in front for static files, and using its url proxy feature to have it shoot the cgi/fastcgi/mod_whatever calls through to Apache.</p>
<p>lighttpd: I started to configure it for its fastcgi feature. However, many are the claims that it suffers significant memory leaks under heavy load. Of those making the claim but sticking with the product, the workaround was a cron job that reloaded the daemon at least nightly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ata</title>
		<link>http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-static-files/comment-page-1/#comment-22534</link>
		<dc:creator>Ata</dc:creator>
		<pubDate>Mon, 09 Apr 2007 18:55:05 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-st#comment-22534</guid>
		<description>Yes after trying it out on Centos 4.4 I can confirm that Tux causes kernel panic on Linux 2.6 kernels. Several people on the Tux list report the same thing. I got it running for anything between 5 hrs and 2.5 days before a kernel panick occured and the server went down. Too bad really. This happens on both SMP and non-SMP kernels. It worked wonderful on 2.4 kernels though. I had it running non-stop without problems on Redhat 9 (!). So the only options for now would probably be to use Tux on an older kernel on a dedicated box, or skip Tux alltogether and use Lighttpd/Nginx/Litespeed instead. :(</description>
		<content:encoded><![CDATA[<p>Yes after trying it out on Centos 4.4 I can confirm that Tux causes kernel panic on Linux 2.6 kernels. Several people on the Tux list report the same thing. I got it running for anything between 5 hrs and 2.5 days before a kernel panick occured and the server went down. Too bad really. This happens on both SMP and non-SMP kernels. It worked wonderful on 2.4 kernels though. I had it running non-stop without problems on Redhat 9 (!). So the only options for now would probably be to use Tux on an older kernel on a dedicated box, or skip Tux alltogether and use Lighttpd/Nginx/Litespeed instead. <img src='http://blogs.law.harvard.edu/philg/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hyperion</title>
		<link>http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-static-files/comment-page-1/#comment-21038</link>
		<dc:creator>hyperion</dc:creator>
		<pubDate>Mon, 26 Feb 2007 00:01:27 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-st#comment-21038</guid>
		<description>TUX on Fedora 5 and 6 caused daily kernel oopses for me. Stay away from it...</description>
		<content:encoded><![CDATA[<p>TUX on Fedora 5 and 6 caused daily kernel oopses for me. Stay away from it&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ata</title>
		<link>http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-static-files/comment-page-1/#comment-20874</link>
		<dc:creator>Ata</dc:creator>
		<pubDate>Mon, 19 Feb 2007 15:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-st#comment-20874</guid>
		<description>I&#039;ve used TUX in the past and served more than what you mention with much smaller servers (1GB, IDE). (Adult gallery hosting).

The file sizes were about the same, however I had only a couple thousand different files.

But as others have mentioned, you actually don&#039;t even need TUX for that relatively small amount of hits/second.

But while you don&#039;t NEED TUX it would still make your site *fly*, and leave a LOT of room for growth. Your only concern would be disk I/O (if the images don&#039;t fit all into RAM, or each user requests wildly different images) and your server&#039;s uplink to the internet (100mbps, 1gbps). 

On Redhat/Centos, TUX is already there, and after

/etc/rc.d/init.d/tux  start
/etc/rc.d/init.d/tux  stop

you can start configuring it. You can be up and running within minutes. It runs very well along with Apache on the same machine, too. I.e. if you wanted to server dynamic pages from the same server. In this case TUX will sit in front at port 80 and pass every file with extensions specified by you to Apache in the background at port 8080. Restart of xinetd required to have Apache leave port 80 and let TUX go there. If it won&#039;t work just reboot the whole server.

Only drawback is TUX doesn&#039;t have any hotlink protection (no htaccess). But if that is a concern you can work around that by changing the path to the images with symlinks &amp; cron jobs regularely. Have a symlink point to the real (internal) path, create a new random symlink every hour or day, and delete the old symlink after the new symlink has been active for some time (to prevent broken images for users).

Of course, if you push a lot of bandwidth, usually hotlinking won&#039;t have any noticable effect anyway, so I personally just let away the whole part with path changing.

If you&#039;re concerned about speed, and room for growth, look no further, TUX is second to none for static file serving and will put a smile on your face...</description>
		<content:encoded><![CDATA[<p>I&#8217;ve used TUX in the past and served more than what you mention with much smaller servers (1GB, IDE). (Adult gallery hosting).</p>
<p>The file sizes were about the same, however I had only a couple thousand different files.</p>
<p>But as others have mentioned, you actually don&#8217;t even need TUX for that relatively small amount of hits/second.</p>
<p>But while you don&#8217;t NEED TUX it would still make your site *fly*, and leave a LOT of room for growth. Your only concern would be disk I/O (if the images don&#8217;t fit all into RAM, or each user requests wildly different images) and your server&#8217;s uplink to the internet (100mbps, 1gbps). </p>
<p>On Redhat/Centos, TUX is already there, and after</p>
<p>/etc/rc.d/init.d/tux  start<br />
/etc/rc.d/init.d/tux  stop</p>
<p>you can start configuring it. You can be up and running within minutes. It runs very well along with Apache on the same machine, too. I.e. if you wanted to server dynamic pages from the same server. In this case TUX will sit in front at port 80 and pass every file with extensions specified by you to Apache in the background at port 8080. Restart of xinetd required to have Apache leave port 80 and let TUX go there. If it won&#8217;t work just reboot the whole server.</p>
<p>Only drawback is TUX doesn&#8217;t have any hotlink protection (no htaccess). But if that is a concern you can work around that by changing the path to the images with symlinks &amp; cron jobs regularely. Have a symlink point to the real (internal) path, create a new random symlink every hour or day, and delete the old symlink after the new symlink has been active for some time (to prevent broken images for users).</p>
<p>Of course, if you push a lot of bandwidth, usually hotlinking won&#8217;t have any noticable effect anyway, so I personally just let away the whole part with path changing.</p>
<p>If you&#8217;re concerned about speed, and room for growth, look no further, TUX is second to none for static file serving and will put a smile on your face&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rio Neil</title>
		<link>http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-static-files/comment-page-1/#comment-20659</link>
		<dc:creator>Rio Neil</dc:creator>
		<pubDate>Sun, 11 Feb 2007 11:39:29 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-st#comment-20659</guid>
		<description>Well, I think you should outsource file delivery to large content delivery networks, like LocalMirror (http://www.localmirror.com) and other companies as some people suggested in above posts?</description>
		<content:encoded><![CDATA[<p>Well, I think you should outsource file delivery to large content delivery networks, like LocalMirror (<a href="http://www.localmirror.com" rel="nofollow">http://www.localmirror.com</a>) and other companies as some people suggested in above posts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hyperion</title>
		<link>http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-static-files/comment-page-1/#comment-20571</link>
		<dc:creator>hyperion</dc:creator>
		<pubDate>Tue, 06 Feb 2007 11:40:30 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-st#comment-20571</guid>
		<description>I would not suggest using nginx or any single-threaded synchronous-IO (read(), sendfile()) webserver, as with a big fileset IO can become disk-seek speed bound instead of disk throughput bound. The solutions are 1) use a multithreaded webserver (which you already do), where the OS can reorder IO somewhat or 2) use an async-IO based webserver. The problem with async-IO is that the POSIX implementations are usually limited to a small nubmer of ongoing IOs at a time, so the server would need to use OS-specific AIO interface until this improves... The only httpd which I know of that can do this is lighttpd 1.5 branch on Linux which is not released yet unfortunately. I expect the current lighttpd 1.4 branch perform worse than Apache 2.2, but that will change...

With S3 I&#039;ve had some very bad experience. Bandwidth was very slow. Maybe they solved that now but is it really intended as a content distribution network? I think Limelight is better for content distribution (for example MySpace uses it for pictures). Can&#039;t comment on Akamai.</description>
		<content:encoded><![CDATA[<p>I would not suggest using nginx or any single-threaded synchronous-IO (read(), sendfile()) webserver, as with a big fileset IO can become disk-seek speed bound instead of disk throughput bound. The solutions are 1) use a multithreaded webserver (which you already do), where the OS can reorder IO somewhat or 2) use an async-IO based webserver. The problem with async-IO is that the POSIX implementations are usually limited to a small nubmer of ongoing IOs at a time, so the server would need to use OS-specific AIO interface until this improves&#8230; The only httpd which I know of that can do this is lighttpd 1.5 branch on Linux which is not released yet unfortunately. I expect the current lighttpd 1.4 branch perform worse than Apache 2.2, but that will change&#8230;</p>
<p>With S3 I&#8217;ve had some very bad experience. Bandwidth was very slow. Maybe they solved that now but is it really intended as a content distribution network? I think Limelight is better for content distribution (for example MySpace uses it for pictures). Can&#8217;t comment on Akamai.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Moniz</title>
		<link>http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-static-files/comment-page-1/#comment-20230</link>
		<dc:creator>Dan Moniz</dc:creator>
		<pubDate>Fri, 19 Jan 2007 10:41:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-st#comment-20230</guid>
		<description>Hi Philip,

I&#039;m a fan of mathopd, though I confess that the last time I looked into the &quot;fast static file webserver&quot; space was circa 2003, and the game was pretty much between Apache 1.x, thttpd, mathopd, and maybe one other one I can&#039;t recall. I read a lot of benchmarks other people had done (most of which showed poor understanding of statistical methods), set up my own non-scientific tests, and then read the code of parts of them, including thttpd and mathopd. I picked mathopd at the time because it seemed to win most for my use case and I could understand the code easily, something I couldn&#039;t say for thttpd. Some thttpd security holes had me concerned as well. mathopd has not been free of them, but I sensed less opportunity for them to creep in given the way mathopd was written. None of this may matter much for your uses.

I haven&#039;t compared mathopd to the newer servers others have mentioned here, including lighttpd and ngnix, but if I do, I&#039;ll let you know what I find out.</description>
		<content:encoded><![CDATA[<p>Hi Philip,</p>
<p>I&#8217;m a fan of mathopd, though I confess that the last time I looked into the &#8220;fast static file webserver&#8221; space was circa 2003, and the game was pretty much between Apache 1.x, thttpd, mathopd, and maybe one other one I can&#8217;t recall. I read a lot of benchmarks other people had done (most of which showed poor understanding of statistical methods), set up my own non-scientific tests, and then read the code of parts of them, including thttpd and mathopd. I picked mathopd at the time because it seemed to win most for my use case and I could understand the code easily, something I couldn&#8217;t say for thttpd. Some thttpd security holes had me concerned as well. mathopd has not been free of them, but I sensed less opportunity for them to creep in given the way mathopd was written. None of this may matter much for your uses.</p>
<p>I haven&#8217;t compared mathopd to the newer servers others have mentioned here, including lighttpd and ngnix, but if I do, I&#8217;ll let you know what I find out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will Macdonald</title>
		<link>http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-static-files/comment-page-1/#comment-20105</link>
		<dc:creator>Will Macdonald</dc:creator>
		<pubDate>Sat, 13 Jan 2007 23:48:59 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-st#comment-20105</guid>
		<description>I would try PublicFile. Written by Dan Bernstien of Qmail fame.

http://cr.yp.to/publicfile.html</description>
		<content:encoded><![CDATA[<p>I would try PublicFile. Written by Dan Bernstien of Qmail fame.</p>
<p><a href="http://cr.yp.to/publicfile.html" rel="nofollow">http://cr.yp.to/publicfile.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: patrick giagnocavo</title>
		<link>http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-static-files/comment-page-1/#comment-20049</link>
		<dc:creator>patrick giagnocavo</dc:creator>
		<pubDate>Fri, 12 Jan 2007 06:15:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.law.harvard.edu/philg/2007/01/05/best-web-server-program-for-a-lot-of-st#comment-20049</guid>
		<description>I suggest testing a separate AOLserver process on a separate IP address dedicated to just serving the static image files.  Don&#039;t load any of your nice TCL code into it, it should take only a few MB of RAM.  You could try bumping up the thread count to say 50, and with so little TCL code in each thread the RAM usage will still be low.

Also you should definitely go to more than 4GB RAM. Opteron systems seem to do better  with lots of RAM, provided you are running a 64bit kernel (I use Solaris 10 myself, but Centos x64 should be fine also).  Be sure that the RAM is installed properly with equal amounts of RAM in each CPU&#039;s bank of RAM.</description>
		<content:encoded><![CDATA[<p>I suggest testing a separate AOLserver process on a separate IP address dedicated to just serving the static image files.  Don&#8217;t load any of your nice TCL code into it, it should take only a few MB of RAM.  You could try bumping up the thread count to say 50, and with so little TCL code in each thread the RAM usage will still be low.</p>
<p>Also you should definitely go to more than 4GB RAM. Opteron systems seem to do better  with lots of RAM, provided you are running a 64bit kernel (I use Solaris 10 myself, but Centos x64 should be fine also).  Be sure that the RAM is installed properly with equal amounts of RAM in each CPU&#8217;s bank of RAM.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
