<?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; gzip_static</title>
	<atom:link href="http://god.morgon.nu/tag/gzip_static/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>staticgenerator for django with gzip support</title>
		<link>http://god.morgon.nu/2009/05/03/staticgenerator-for-django-with-gzip-support/</link>
		<comments>http://god.morgon.nu/2009/05/03/staticgenerator-for-django-with-gzip-support/#comments</comments>
		<pubDate>Sun, 03 May 2009 18:07:15 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[gzip_static]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[staticgenerator]]></category>

		<guid isPermaLink="false">http://god.morgon.nu/?p=90</guid>
		<description><![CDATA[I have written about staticgenerator before. It&#8217;s the python library with a django middleware which generates static html, xml or whatever of your dynamic site and let you serve it with for example nginx to speed up things.
One thing that always bothered me with staticgenerator is that nginx had to gzip the same html over [...]]]></description>
			<content:encoded><![CDATA[<p>I have <a href="http://god.morgon.nu/tag/staticgenerator/">written</a> about <a href="http://github.com/JaredKuolt/staticgenerator/tree/master">staticgenerator</a> before. It&#8217;s the python library with a django middleware which generates static html, xml or whatever of your dynamic site and let you serve it with for example nginx to speed up things.</p>
<p>One thing that always bothered me with staticgenerator is that nginx had to gzip the same html over and over again on requests with the <code>Accept-Encoding: gzip</code> header. Now that I <a href="http://god.morgon.nu/2009/05/02/latest-nginx-with-gzip_static-ubuntu-jaunty-jackalope-deb-package/">found love</a> with <a href="http://wiki.nginx.org/NginxHttpGzipStaticModule">gzip_static</a> it&#8217;s super easy to serve precompressed .gz files with nginx. The feature it self has been around in nginx for a while but it wasn&#8217;t untill recently it got to my attention.</p>
<p>Since I already have <a href="http://github.com/andriijas/staticgeneratormem/tree/master">one fork</a> of staticgenerator at github I choosed to fork from <a href="http://github.com/ekarulf/staticgenerator/tree/master">Erik Karulf </a>instead. I wanted his excellent changes which enables atomic file generation anyway.</p>
<p>So straight from the oven, <a href="http://github.com/andriijas/staticgenerator/tree/master">staticgenerator with atomic file generation and atomic gzip support</a>. I&#8217;ll ping <a href="http://github.com/JaredKuolt">Jared Kuolt on github</a> and hopefully he will merge mine and Erik&#8217;s changes into the main repository and makes a new release.</p>
<p>Feel free to post feedback of any kind in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://god.morgon.nu/2009/05/03/staticgenerator-for-django-with-gzip-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Latest nginx with gzip_static ubuntu jaunty jackalope deb package</title>
		<link>http://god.morgon.nu/2009/05/02/latest-nginx-with-gzip_static-ubuntu-jaunty-jackalope-deb-package/</link>
		<comments>http://god.morgon.nu/2009/05/02/latest-nginx-with-gzip_static-ubuntu-jaunty-jackalope-deb-package/#comments</comments>
		<pubDate>Sat, 02 May 2009 13:35:09 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gzip_static]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://god.morgon.nu/?p=82</guid>
		<description><![CDATA[nginx in ubuntu 9.04 aka jaunty jackalope is compiled without gzip_static support (Bug report).  Waiting for it to be resolved seems like to be waiting for ubuntu karmic koala.
gzip_static enables nginx to check for pre gzip&#8217;d files so it doesn&#8217;t have to gzip the same content over and over again, which saves you a [...]]]></description>
			<content:encoded><![CDATA[<p>nginx in <a href="http://www.ubuntu.com/">ubuntu</a> 9.04 aka jaunty jackalope is compiled without gzip_static support (<a href="https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/346010">Bug report</a>).  Waiting for it to be resolved seems like to be waiting for ubuntu karmic koala.</p>
<p><code>gzip_static</code> enables nginx to check for pre gzip&#8217;d files so it doesn&#8217;t have to gzip the same content over and over again, which saves you a lot of cpu on high traffic sites. Say you request <code>/foo/index.html</code>  with <code>Accept-Encoding: gzip</code> and there is a file in your doc root <code>foo/index.html.gz</code>, nginx will then take that <code>index.html.gz</code> and serve it instead of gziping foo/index.html on the fly.</p>
<p>Upgrading and compiling deb packages seems to be easier than ever, I found a tutorial on the <a href="http://ubuntuforums.org/showthread.php?t=1105902">ubuntu forum</a> which explains in just a few steps on how to always have the latest nginx available in a ubuntu fashion (conf in /etc/nginx,  startup script in /etc/init.d  and so on). I guess the tutorial works for 0.6.x versions aswell as 0.7.x. I only tried 0.7, not that I need any specific 0.7 features but I like to have the latest and greatest :)</p>
<p>Anyway if you still don&#8217;t want to compile it, you can download <a href="http://god.morgon.nu/public/nginx-jaunty/nginx_0.7.54-0ubuntu1_i386.deb">nginx_0.7.54-0ubuntu1_i386.deb</a> from my <a href="http://god.morgon.nu/public/">public files section</a>.</p>
<pre><code>$ wget http://god.morgon.nu/public/nginx-jaunty/nginx_0.7.54-0ubuntu1_i386.deb
$ sudo dpkg -i nginx_0.7.54-0ubuntu1_i386.deb
</code></pre>
<p>I don&#8217;t have any energy to put up an apt repository but chances are I will keep publishing new nginx packages on there. Keep in mind I only have 10 mbit up, feel free to mirror it and include a link back to this post or post a mirror link in the comments. Also feel free to post comments if you like this or if you have any feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://god.morgon.nu/2009/05/02/latest-nginx-with-gzip_static-ubuntu-jaunty-jackalope-deb-package/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<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>
