<?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"
	>
<channel>
	<title>Comments on: Lighttpd as reverse proxy</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/</link>
	<description>Everything about MySQL Performance</description>
	<pubDate>Tue, 02 Dec 2008 20:06:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Brian</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/#comment-317254</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Tue, 24 Jun 2008 20:50:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=414#comment-317254</guid>
		<description>peter, it's not hard to get Apache to be on a diet, just don't load stuff you don't need.  Plus, apache 2.x, with full threading, has been out for several years. Also, the whole "a server must be event/async to perform well" mantra doesn't hold up in the real world.  I like alot about lightttpd and nginx, but the performance FUD is just that.  It just seems they come with a more "reasonable" default config.</description>
		<content:encoded><![CDATA[<p>peter, it&#8217;s not hard to get Apache to be on a diet, just don&#8217;t load stuff you don&#8217;t need.  Plus, apache 2.x, with full threading, has been out for several years. Also, the whole &#8220;a server must be event/async to perform well&#8221; mantra doesn&#8217;t hold up in the real world.  I like alot about lightttpd and nginx, but the performance FUD is just that.  It just seems they come with a more &#8220;reasonable&#8221; default config.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/#comment-317250</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 24 Jun 2008 20:46:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=414#comment-317250</guid>
		<description>Brian,

I think when we speak about Apache we mainly mean apache in prefork mode w process per connection which obviously does not scale.  Recent apache versions have event driven handling which should place them close to lighty and nginx.  There is still more "fat" in apache though for most users it does not matter.</description>
		<content:encoded><![CDATA[<p>Brian,</p>
<p>I think when we speak about Apache we mainly mean apache in prefork mode w process per connection which obviously does not scale.  Recent apache versions have event driven handling which should place them close to lighty and nginx.  There is still more &#8220;fat&#8221; in apache though for most users it does not matter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/#comment-317248</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 24 Jun 2008 20:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=414#comment-317248</guid>
		<description>Lukas,

We tried using Varnish for one of the projects but had so many crashes we had to pull back to the squid for a while.
I think Varnish is a great project but it needs to mature still, at least for some use cases.</description>
		<content:encoded><![CDATA[<p>Lukas,</p>
<p>We tried using Varnish for one of the projects but had so many crashes we had to pull back to the squid for a while.<br />
I think Varnish is a great project but it needs to mature still, at least for some use cases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/#comment-317212</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Tue, 24 Jun 2008 18:42:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=414#comment-317212</guid>
		<description>JohnSep, of course we don't do 50k all day long...  But 50k connections on a "normal" server is not that "hard" for apache.  You have to tune your OS and Apache - not as much as you would think - but you have to do that anyway.  The GigE interface is almost always the bottleneck.

An old presentation with 2004 data I did : http://www.akins.org/files/apachecon-cnn-good.ppt

Most of the cool stuff is in normal Apache now (or some implementation of it)</description>
		<content:encoded><![CDATA[<p>JohnSep, of course we don&#8217;t do 50k all day long&#8230;  But 50k connections on a &#8220;normal&#8221; server is not that &#8220;hard&#8221; for apache.  You have to tune your OS and Apache - not as much as you would think - but you have to do that anyway.  The GigE interface is almost always the bottleneck.</p>
<p>An old presentation with 2004 data I did : <a href="http://www.akins.org/files/apachecon-cnn-good.ppt" rel="nofollow">http://www.akins.org/files/apachecon-cnn-good.ppt</a></p>
<p>Most of the cool stuff is in normal Apache now (or some implementation of it)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simetrical</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/#comment-317177</link>
		<dc:creator>Simetrical</dc:creator>
		<pubDate>Tue, 24 Jun 2008 17:45:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=414#comment-317177</guid>
		<description>FWIW, an old Wikimedia report[1] says that they maintain only 14,000-32,000 connections per *Squid*, never mind the Apaches (which are presumably much lower).  Of course, they use a mod_php setup for the Apaches, apparently because nobody's ever gotten around to changing it.

[1] http://www.scribd.com/doc/43872/Wikimedia-architecture (not the original source, but the first Google hit)</description>
		<content:encoded><![CDATA[<p>FWIW, an old Wikimedia report[1] says that they maintain only 14,000-32,000 connections per *Squid*, never mind the Apaches (which are presumably much lower).  Of course, they use a mod_php setup for the Apaches, apparently because nobody&#8217;s ever gotten around to changing it.</p>
<p>[1] <a href="http://www.scribd.com/doc/43872/Wikimedia-architecture" rel="nofollow">http://www.scribd.com/doc/43872/Wikimedia-architecture</a> (not the original source, but the first Google hit)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnShep</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/#comment-317175</link>
		<dc:creator>JohnShep</dc:creator>
		<pubDate>Tue, 24 Jun 2008 17:37:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=414#comment-317175</guid>
		<description>Brian, I am dumbfounded that one server can handle 50k connections. Say each request is processed in a second that would equate to over 4 Billion hits a day !</description>
		<content:encoded><![CDATA[<p>Brian, I am dumbfounded that one server can handle 50k connections. Say each request is processed in a second that would equate to over 4 Billion hits a day !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/#comment-317173</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Tue, 24 Jun 2008 17:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=414#comment-317173</guid>
		<description>We just use apache.  We can handle around 50k connections fairly per server easily.  We run all the dynamic stuff via fastcgi or mod_jk to Tomcat for Java.  The whole "apache is slow" thing doesn't make sense if you actually try to configure apache beyond the configs most vendors supply.</description>
		<content:encoded><![CDATA[<p>We just use apache.  We can handle around 50k connections fairly per server easily.  We run all the dynamic stuff via fastcgi or mod_jk to Tomcat for Java.  The whole &#8220;apache is slow&#8221; thing doesn&#8217;t make sense if you actually try to configure apache beyond the configs most vendors supply.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lukas</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/#comment-315108</link>
		<dc:creator>Lukas</dc:creator>
		<pubDate>Thu, 19 Jun 2008 12:16:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=414#comment-315108</guid>
		<description>@6: Yes, it is. Using lighty in front of Apache instead of in parallel is a somewhat strange construct but depending on your setup/overall goal it might make sense.

Though what most ppl want to achieve is a faster and less CPU&#38;IO intensive delivery of their static contents.

Now squid hasn't been the best choice to do this for about 10 years now, since it's internal architecture is somewhat 80s style (find a good description of the details at http://varnish.projects.linpro.no/wiki/ArchitectNotes). There's been commercial alternatives like cachebox and netcache around for a while now.

A very nice, open source, alternative is varnish (http://varnish.projects.linpro.no/). It provides a pretty flexible scripting language that gets compiled on the fly and offers fine-grained control over "what to do with this http request". We measured a throughput of about 10.000 requests/sec. on a single Core2Duo Desktop Box using just one of the two cores. On a typical modern Xeon 2x Quadcore Server you should expect to get something around 40-80k requests/sec - that is, if your servers network connection offers sufficient bandwith. 

A quick apache bench from my macbook pro to the desktop box mentioned shows the following result on a GigE network:
=========================
Server Software:        Apache/2.2.3
Server Hostname:        cache2.lcms.c4.dev.local
Server Port:            80

Document Path:          /login.html
Document Length:        2241 bytes

Concurrency Level:      200
Time taken for tests:   10.946997 seconds
Complete requests:      100000
Failed requests:        0
Write errors:           0
Total transferred:      254900000 bytes
HTML transferred:       224100000 bytes
Requests per second:    9134.93 [#/sec] (mean)
Time per request:       21.894 [ms] (mean)
Time per request:       0.109 [ms] (mean, across all concurrent requests)
Transfer rate:          22739.11 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    3   2.4      3      15
Processing:     4   18   1.8     18      27
Waiting:        0    7   1.9      8      17
Total:          6   21   3.3     21      32

Percentage of the requests served within a certain time (ms)
  50%     21
  66%     23
  75%     24
  80%     24
  90%     26
  95%     27
  98%     27
  99%     28
 100%     32 (longest request)
=========================

So, if all you want to do is accelerate access to your static content, varnish might be a pretty good option. Of course lighty offers alot more than just content caching so I guess depending on what one's goals are the one or the other might be better suited.

Cheers,
-- Lukas</description>
		<content:encoded><![CDATA[<p>@6: Yes, it is. Using lighty in front of Apache instead of in parallel is a somewhat strange construct but depending on your setup/overall goal it might make sense.</p>
<p>Though what most ppl want to achieve is a faster and less CPU&amp;IO intensive delivery of their static contents.</p>
<p>Now squid hasn&#8217;t been the best choice to do this for about 10 years now, since it&#8217;s internal architecture is somewhat 80s style (find a good description of the details at <a href="http://varnish.projects.linpro.no/wiki/ArchitectNotes" rel="nofollow">http://varnish.projects.linpro.no/wiki/ArchitectNotes</a>). There&#8217;s been commercial alternatives like cachebox and netcache around for a while now.</p>
<p>A very nice, open source, alternative is varnish (http://varnish.projects.linpro.no/). It provides a pretty flexible scripting language that gets compiled on the fly and offers fine-grained control over &#8220;what to do with this http request&#8221;. We measured a throughput of about 10.000 requests/sec. on a single Core2Duo Desktop Box using just one of the two cores. On a typical modern Xeon 2x Quadcore Server you should expect to get something around 40-80k requests/sec - that is, if your servers network connection offers sufficient bandwith. </p>
<p>A quick apache bench from my macbook pro to the desktop box mentioned shows the following result on a GigE network:<br />
=========================<br />
Server Software:        Apache/2.2.3<br />
Server Hostname:        cache2.lcms.c4.dev.local<br />
Server Port:            80</p>
<p>Document Path:          /login.html<br />
Document Length:        2241 bytes</p>
<p>Concurrency Level:      200<br />
Time taken for tests:   10.946997 seconds<br />
Complete requests:      100000<br />
Failed requests:        0<br />
Write errors:           0<br />
Total transferred:      254900000 bytes<br />
HTML transferred:       224100000 bytes<br />
Requests per second:    9134.93 [#/sec] (mean)<br />
Time per request:       21.894 [ms] (mean)<br />
Time per request:       0.109 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          22739.11 [Kbytes/sec] received</p>
<p>Connection Times (ms)<br />
              min  mean[+/-sd] median   max<br />
Connect:        0    3   2.4      3      15<br />
Processing:     4   18   1.8     18      27<br />
Waiting:        0    7   1.9      8      17<br />
Total:          6   21   3.3     21      32</p>
<p>Percentage of the requests served within a certain time (ms)<br />
  50%     21<br />
  66%     23<br />
  75%     24<br />
  80%     24<br />
  90%     26<br />
  95%     27<br />
  98%     27<br />
  99%     28<br />
 100%     32 (longest request)<br />
=========================</p>
<p>So, if all you want to do is accelerate access to your static content, varnish might be a pretty good option. Of course lighty offers alot more than just content caching so I guess depending on what one&#8217;s goals are the one or the other might be better suited.</p>
<p>Cheers,<br />
&#8211; Lukas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/#comment-315040</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Thu, 19 Jun 2008 06:19:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=414#comment-315040</guid>
		<description>Emil,

Why do you do that ? for mod_security ?</description>
		<content:encoded><![CDATA[<p>Emil,</p>
<p>Why do you do that ? for mod_security ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vadim</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/#comment-315028</link>
		<dc:creator>Vadim</dc:creator>
		<pubDate>Thu, 19 Jun 2008 05:08:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=414#comment-315028</guid>
		<description>To all.

Regarding lighttpd vs ngnix.

Lighttpd is used by youtube.com and wikipedia, so it is proven to be able to work in high load environment.

When we started use lighttpd it seemed more advanced than ngnix, but currently ngnix is still begin active developed, while author of lighttpd is more interested in mysql-proxy development and lighttpd looks frozen, so I even agree that ngnix looks preferable.</description>
		<content:encoded><![CDATA[<p>To all.</p>
<p>Regarding lighttpd vs ngnix.</p>
<p>Lighttpd is used by youtube.com and wikipedia, so it is proven to be able to work in high load environment.</p>
<p>When we started use lighttpd it seemed more advanced than ngnix, but currently ngnix is still begin active developed, while author of lighttpd is more interested in mysql-proxy development and lighttpd looks frozen, so I even agree that ngnix looks preferable.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
