Recently have been getting some feedback about my current setup where Apache is actually performing as the front-end server and uses mod_proxy to pass static media requests to Lighttpd. The gist of their concern is that what I am doing is idiotic. More specifically, that it is pointless to have the apache threads, fattened by the inclusion of mod_python, conveying information on to the much lighter duty Lighttpd. This seems to be the reverse of the ideal setup.
My first response was that my setup must make some coherent sense, otherwise why would a fairly large number of setup guides use it? (This isn't a setup I have only seen once, but have encountered it in a number of places, some of which you would be forgiven for believing understood what they were doing.) However, eventually I went and read the mod_proxy documentation, and I don't really see how my current setup could result in an efficiency gain over using raw Apache.
But, why does this setup keep getting mentioned at hostlibrary.com and the same article was also posted at linux.com. The mod_proxy system is also mentioned at k4ml.com. The system is also mentioned at kelvinism.com.
So, my question is, what gives? Is my current setup inefficient, and if so, why are so many people recommending it?
Would running lighty on a different port and having all links directing to that port have any negative consequences?
The big sites use a subdomain to direct traffic to their lighttpd server. Instead of proxying static content, and wasting a bunch of cycles on bloated apache processes, they simply direct the user's browser to the content, hosted on a completely separate host.
Load up the livehttpheaders addon in firefox and take a peek at http://www.frazpc.pl
They are serving dynamic content using apache on www.frazpc.pl, and static content on i.frazpc.pl.
You could also simply run lighttpd on a separate port on the same server as your apache box, and point all your links to www.example.com:1337 or whatever port you run lighttpd on.
Obviously, you worked the batshit-craziness of your original article out, but yeah, there are a lot of stupid fucked up guides out there.
The very big players that I've seen using lighttpd (youtube, wikipedia) have lighttpd on it's own domain. Then you are obviously getting all of the performance of lighttpd. On the other hand, you then have to manage having this whole other domain. It doesn't have to be that bad though really.
Reply to this entry