<?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/"
		>
<channel>
	<title>Comments on: Avoiding the use of .htaccess for performance</title>
	<atom:link href="http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/</link>
	<description>the personal blog of Stuart Colville covering modern web development techniques and best practices</description>
	<lastBuildDate>Wed, 10 Mar 2010 11:00:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: 20 .htaccess Hacks You Probably Didn&#8217;t Know About &#124; DevMoose</title>
		<link>http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/comment-page-1/#comment-65500</link>
		<dc:creator>20 .htaccess Hacks You Probably Didn&#8217;t Know About &#124; DevMoose</dc:creator>
		<pubDate>Fri, 22 Jan 2010 03:32:25 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/#comment-65500</guid>
		<description>[...] Avoiding the use of .htaccess for performance [...]</description>
		<content:encoded><![CDATA[<p>[...] Avoiding the use of .htaccess for performance [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graham Dumpleton</title>
		<link>http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/comment-page-1/#comment-64224</link>
		<dc:creator>Graham Dumpleton</dc:creator>
		<pubDate>Wed, 09 Apr 2008 11:46:37 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/#comment-64224</guid>
		<description>Definitely concur in respect of production setup for a large volume site if you really want to squeeze out the most performance possible, but then if your site is that big you would be looking at separate media servers and other techniques as well to improve performance.

Frankly, for most of the people out there with their grand plans of having the next super duper site, they will never ever see enough traffic for it to be an issue though. :-)</description>
		<content:encoded><![CDATA[<p>Definitely concur in respect of production setup for a large volume site if you really want to squeeze out the most performance possible, but then if your site is that big you would be looking at separate media servers and other techniques as well to improve performance.</p>
<p>Frankly, for most of the people out there with their grand plans of having the next super duper site, they will never ever see enough traffic for it to be an issue though. <img src='http://muffinresearch.co.uk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stuart Colville</title>
		<link>http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/comment-page-1/#comment-64222</link>
		<dc:creator>Stuart Colville</dc:creator>
		<pubDate>Wed, 09 Apr 2008 10:57:10 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/#comment-64222</guid>
		<description>@Graham: You make some good points here and in particular the point about taking these things in context is very valid. I think the point here I&#039;m overall making here is using .htaccess when there&#039;s no real need to is the important one but I absolutely can see there&#039;s situations where other bottlenecks are going to obliterate any benefits of using conf over .htaccess.

To really get what the performance differences needs to be looked at in further detail. For example; the difference between what directories .htaccess is enabled for i.e. globally or just specific dirs. How much slower is the request if the .htaccess is packed with config for example? Also what hit is encountered when you have several levels of .htaccess files which override each other  as the precedence will have to be analysed to apply the rules correctly. I guess I failed in the regard of not providing a more qualified data based analysis for this post!

All in all I guess it&#039;s fair to say worrying about this is not worth it. However, I also think it&#039;s fair to say that avoiding .htaccess removes any performance hit caused by the reasons listed above and therefore is a good practice especially for production usage.</description>
		<content:encoded><![CDATA[<p>@Graham: You make some good points here and in particular the point about taking these things in context is very valid. I think the point here I&#8217;m overall making here is using .htaccess when there&#8217;s no real need to is the important one but I absolutely can see there&#8217;s situations where other bottlenecks are going to obliterate any benefits of using conf over .htaccess.</p>
<p>To really get what the performance differences needs to be looked at in further detail. For example; the difference between what directories .htaccess is enabled for i.e. globally or just specific dirs. How much slower is the request if the .htaccess is packed with config for example? Also what hit is encountered when you have several levels of .htaccess files which override each other  as the precedence will have to be analysed to apply the rules correctly. I guess I failed in the regard of not providing a more qualified data based analysis for this post!</p>
<p>All in all I guess it&#8217;s fair to say worrying about this is not worth it. However, I also think it&#8217;s fair to say that avoiding .htaccess removes any performance hit caused by the reasons listed above and therefore is a good practice especially for production usage.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graham Dumpleton</title>
		<link>http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/comment-page-1/#comment-64221</link>
		<dc:creator>Graham Dumpleton</dc:creator>
		<pubDate>Wed, 09 Apr 2008 10:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/#comment-64221</guid>
		<description>You talk about .htaccess files being a performance problem, but have you actually done proper benchmarking on it with a real world web application?

Take as an example a simple hello world application implemented in Python on top of WSGI and hosted using mod_wsgi. If you compare raw requests per second between an application configured in main Apache configuration, to one configured in .htaccess file of document root, you may see approximately five percent drop in throughput for the single .htaccess file case.

This may seem a lot to those aiming to get maximum performance out of their server, but you really have to put it in context. For a simple hello world program the extra time taken up in a single request due to use of .htaccess files may end up being something like five percent of half a millisecond.

If you now load up a large Python web application such as Django talking to a back end database, whereas you might achieve 2000 requests per second with the hello world application, you may be lucky to achieve 200 requests per second (and probably a lot less) with Django. The extra overhead of using .htaccess files in that case becomes microseconds within a request taking tens of milliseconds, so basically the overhead of the .htaccess files just get swallowed up in the greater overheads of Django itself and the database.

Thus, that .htaccess files are bad in some way due to performance is a bit of a myth in some respects. It may have some relevance if you are serving only static files in a very high load site, but if you are running a large dynamic web application, it is generally not an issue.</description>
		<content:encoded><![CDATA[<p>You talk about .htaccess files being a performance problem, but have you actually done proper benchmarking on it with a real world web application?</p>
<p>Take as an example a simple hello world application implemented in Python on top of WSGI and hosted using mod_wsgi. If you compare raw requests per second between an application configured in main Apache configuration, to one configured in .htaccess file of document root, you may see approximately five percent drop in throughput for the single .htaccess file case.</p>
<p>This may seem a lot to those aiming to get maximum performance out of their server, but you really have to put it in context. For a simple hello world program the extra time taken up in a single request due to use of .htaccess files may end up being something like five percent of half a millisecond.</p>
<p>If you now load up a large Python web application such as Django talking to a back end database, whereas you might achieve 2000 requests per second with the hello world application, you may be lucky to achieve 200 requests per second (and probably a lot less) with Django. The extra overhead of using .htaccess files in that case becomes microseconds within a request taking tens of milliseconds, so basically the overhead of the .htaccess files just get swallowed up in the greater overheads of Django itself and the database.</p>
<p>Thus, that .htaccess files are bad in some way due to performance is a bit of a myth in some respects. It may have some relevance if you are serving only static files in a very high load site, but if you are running a large dynamic web application, it is generally not an issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stuart Colville</title>
		<link>http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/comment-page-1/#comment-64220</link>
		<dc:creator>Stuart Colville</dc:creator>
		<pubDate>Wed, 09 Apr 2008 08:38:10 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/#comment-64220</guid>
		<description>@James: Absolutely! I&#039;ve updated the post to make that point a touch clearer.</description>
		<content:encoded><![CDATA[<p>@James: Absolutely! I&#8217;ve updated the post to make that point a touch clearer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Broad</title>
		<link>http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/comment-page-1/#comment-64219</link>
		<dc:creator>James Broad</dc:creator>
		<pubDate>Wed, 09 Apr 2008 08:29:08 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/04/07/avoiding-the-use-of-htaccess-for-performance/#comment-64219</guid>
		<description>Great summary, the only problem is usually with shared hosting plans where you may not have access/ability to modify the httpd.conf.</description>
		<content:encoded><![CDATA[<p>Great summary, the only problem is usually with shared hosting plans where you may not have access/ability to modify the httpd.conf.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
