<?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>Sam Says...</title>
	<atom:link href="http://samsharpe.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://samsharpe.net</link>
	<description>Musings on Life, The Internet and Everything.</description>
	<lastBuildDate>Sun, 08 Jan 2012 21:29:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The power of the CDN</title>
		<link>http://samsharpe.net/2012/01/08/the-power-of-the-cdn/</link>
		<comments>http://samsharpe.net/2012/01/08/the-power-of-the-cdn/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 21:14:06 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://samsharpe.net/?p=31</guid>
		<description><![CDATA[As absolutely no-one on Earth will have noticed, this WordPress installation is entirely experimental. It's hosted on Rackspace Cloud on a fairly unremarkable Cloud Server. What makes it rather different to my day job is that this server runs NginX rather than Apache and is a little bit more groovy than most. The first important [...]]]></description>
			<content:encoded><![CDATA[<p>As absolutely no-one on Earth will have noticed, this <strong>WordPress</strong> installation is entirely experimental. It's hosted on <strong><a title="Rackspace Cloud Website" href="http://www.rackspace.com/cloud/">Rackspace Cloud</a></strong> on a fairly unremarkable Cloud Server. What makes it rather different to my day job is that this server runs<strong> <a title="NginX Website" href="http://nginx.org/">NginX</a></strong> rather than Apache and is a little bit more groovy than most.</p>
<p>The first important question is "why NginX?", to which the answer would be that this is a <strong>512MB Cloud Server</strong> (which indicates the amount of RAM) and simply couldn't handle a multi-user Blog installation under <strong>Apache</strong> and <strong>mod_php</strong> without significant performance tuning. <strong>NginX</strong> on the other hand is an extremely lightweight webserver which is perfectly suited to that scenario.</p>
<p>There are a few small challenges with NginX - namely that it doesn't "run" PHP or Python code - and I use those quite extensively. Instead, it provides the concept of backends - in my case I have some instances of PHP FastCGI Process Manager (<strong>php-fpm</strong>) to handle the PHP code, such as this WordPress installation and a custom <strong>spawn-fcgi</strong> implementation that spawns some instances of <strong>fcgiwrap</strong> to handle regular Python CGI binaries (I don't tend to knock up scripts using a full framework, so this implementation is a lot more lightweight than using the CGI server included in something like the <strong>Django</strong> or <strong>CherryPy</strong> application server frameworks.</p>
<p>And what that left me with was a WordPress installation that loaded on a fairly average DSL connection in less than 3 seconds. "Hooray!" you say, not bad for that hardware - but  I know we can do a lot better... which is where CDN's like <a title="Rackspace Cloud Files Website" href="http://www.rackspace.com/cloud/cloud_hosting_products/files/">Rackspace Cloud Files</a> and a WordPress plugin called <strong>W3 Total Cache</strong> comes in. By pushing all of my media files into a CloudFiles Container, I can make a single view of this <strong>WordPress</strong> installation download one single file (index.php) from this <strong>Cloud Server</strong> and the rest comes from <strong>Cloud Files</strong> over the CDN.</p>
<p>Total load time now on that fairly average DSL connection: 550 - 750ms</p>
<p>Win!</p>
]]></content:encoded>
			<wfw:commentRss>http://samsharpe.net/2012/01/08/the-power-of-the-cdn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Database Caching 3/7 queries in 0.002 seconds using memcached
Object Caching 254/256 objects using memcached
Content Delivery Network via Rackspace Cloud Files: cdnw.samsharpe.net

Served from: _ @ 2012-02-23 06:27:44 -->
