<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>god morgon! &#187; apache</title>
	<atom:link href="http://god.morgon.nu/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://god.morgon.nu</link>
	<description></description>
	<lastBuildDate>Fri, 23 Oct 2009 13:35:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Why this site is crazy fast</title>
		<link>http://god.morgon.nu/2009/05/01/why-this-site-is-crazy-fast/</link>
		<comments>http://god.morgon.nu/2009/05/01/why-this-site-is-crazy-fast/#comments</comments>
		<pubDate>Fri, 01 May 2009 08:29:34 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[gzip_static]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp-super-cache]]></category>

		<guid isPermaLink="false">http://god.morgon.nu/?p=73</guid>
		<description><![CDATA[I love web performence pretty much like 15 years likes to trim their mopeds. (At least they did like to  before web). While the blog definitely scaled better over at wordpress.com, I believe it performs better on my ubuntu server powered laptop at home, since it only powers one instead of gazillions of blogs. [...]]]></description>
			<content:encoded><![CDATA[<p>I love web performence pretty much like 15 years likes to trim their mopeds. (At least they did like to  before web). While the blog definitely scaled better over at <a href="http://www.wordpress.com">wordpress.com</a>, I believe it performs better on my ubuntu server powered laptop at home, since it only powers one instead of gazillions of blogs. Also I was surprised I needed to pay $15/year just to be able to customize the css on wp.com. So here follows a short description of how I took full control over the stack.</p>
<p>The bad parts of making the switch was that I needed to bloat my precious server with <a href="http://dev.mysql.com/">mysql</a> and <a href="http://www.php.net">php</a> ;)  I might move to <a href="http://zine.pocoo.org/">Zine</a> when it gets a little more mature but for now I really don&#8217;t care. Anyway. Basicly it&#8217;s the <a href="http://wordpress.org/extend/plugins/wp-super-cache/">wp-super-cache</a> plugin that makes the most from a performence perspective. It&#8217;s pretty much <a href="http://github.com/JaredKuolt/staticgenerator/">staticgenerator</a> for wordpress, it generates static html files from the blog. But instead of letting the proxypassed apache serve those html files, I of course serve them with nginx. Not only is it faster, it let&#8217;s me fine tune the config in ways apache doesn&#8217;t, beacuse of it&#8217;s support for if statements. That makes it easy to serve the cached created files with expire headers.</p>
<pre><code>if (-f $document_root/$supercache_file) {
  rewrite ^(.*)$ $supercache_file;
  expires 1h;
  break;
}</code></pre>
<p>Obvious overkill you might think. But fact is I don&#8217;t post new posts very often, so why should one need to download the same html twice? wp-super-cache also generates gzip&#8217;d files, so you don&#8217;t need to waste cpu on gziping the same html over and over again. With <a href="http://god.morgon.nu/2009/05/02/latest-nginx-with-gzip_static-ubuntu-jaunty-jackalope-deb-package/">gzip_static in nginx</a> this is possible. If you request <code>/foo/index.html</code> with <code>Accept-Encoding: gzip</code> and have <code>gzip_static on</code>, nginx automaticly checks if there is a file <code>/foo/index.html.gz</code> and serves it.</p>
<p>Does all this makes this site diggproof? I don&#8217;t know for sure. I guess it all depends on my bandwidth (10 mbit up should be enough) and also if many people makes comments on the same time. Chances are pretty low I will get that much traffic anyway. But a fast site makes visitors happy anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://god.morgon.nu/2009/05/01/why-this-site-is-crazy-fast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
