On Feb 4, 2005, at 6:51 PM, Christian Hansen wrote:

1) Use a reverse proxy/cache and send proper Cache-Control and Etag/Content-Length headers, eg:
2) Use a 307 Temporary Redirect and let thttpd serve it.

I tested this, and it works wonderfully. Thanks Christian! I'm still trying to figure out whether it makes sense for my setup -- the inevitable thing I left out is that we wanted people to be able to define their own CSS files to "skin" the site (sorry -- there are so many factors and details with this app). So if you really want to cache the HTML, you have to make the href to the CSS go to a universal redirect cgi, which sends the browser to the actual CSS. In other words, now each page view is invoking mod_perl twice, and possibly thttpd two times on top of that -- as opposed to one call to mod_perl.


So the question becomes: how much real advantage is there to using thttpd instead of Perl's open() and print()? I know the answer is "benchmarking," but as a final question on this topic, I wanted to see if people had a hypothesis/opinion. Two light hits to mod_perl resulting in one or two thttpd hits, or one heavier(?) hit to mod_perl?

- ben



Reply via email to