<?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>Always Get Better &#187; Operating Systems</title>
	<atom:link href="http://www.alwaysgetbetter.com/blog/category/operating-systems/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alwaysgetbetter.com/blog</link>
	<description>Never stop looking for ways to improve</description>
	<lastBuildDate>Mon, 30 Jan 2012 12:00:17 +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>Setting up WordPress with nginx and FastCGI</title>
		<link>http://www.alwaysgetbetter.com/blog/2012/01/30/setting-wordpress-nginx-fastcgi/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2012/01/30/setting-wordpress-nginx-fastcgi/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 12:00:17 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[varnish]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=490</guid>
		<description><![CDATA[All web site owners should feel a burning need to speed. Studies have shown that viewers waiting more than 2 or 3 seconds for content to load online are likely to leave without allowing the page to fully load. This is particularly bad if you&#8217;re trying to run a web site that relies on visitors [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/12/20/fastcgi-nginx-performance-vm/' rel='bookmark' title='Using FastCGI with Nginx for Performance on a VM'>Using FastCGI with Nginx for Performance on a VM</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/09/memcached-session-handler/' rel='bookmark' title='Memcached as Session Handler'>Memcached as Session Handler</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>All web site owners should feel a burning need to speed. Studies have shown that viewers waiting more than 2 or 3 seconds for content to load online are likely to leave without allowing the page to fully load. This is particularly bad if you&#8217;re trying to run a web site that relies on visitors to generate some kind of income &#8211; content is king but speed keeps the king&#8217;s coffers flowing.</p>
<p>If your website isn&#8217;t the fastest it can be, you can take some comfort in the fact that the majority of the &#8220;top&#8221; web sites also suffer from page load times pushing up into the 10 second range (have you BEEN to Amazon lately?). But do take the time to download YSlow today and use its suggestions to start making radical improvements.</p>
<p>I&#8217;ve been very interested in web server performance because it is the first leg of the web page&#8217;s journey to the end user. The speed of execution at the server level is capable of making or breaking the user&#8217;s experience by controlling the amount of &#8216;lag time&#8217; between the web page request and visible activity in the web browser. We want our server to send page data as immediately as possible so the browser can begin rendering it and downloading supporting files.</p>
<p><a href="http://www.alwaysgetbetter.com/blog/wp-content/uploads/2011/12/agb_new.png"><img class="alignright  wp-image-463" title="agb_new" src="http://www.alwaysgetbetter.com/blog/wp-content/uploads/2011/12/agb_new.png" alt="" width="347" height="347" /></a>Not long ago, I described <a href="http://www.alwaysgetbetter.com/blog/2011/12/20/fastcgi-nginx-performance-vm/">my web stack</a> and explained why I moved away from the &#8220;safe&#8221; Apache server solution in favour of nginx. Since nginx doesn&#8217;t have a PHP module I had to use PHP&#8217;s FastCGI (PHP FPM) server with nginx as a reverse proxy. Additionally, I used memcached to store sessions rather than writing to disk.</p>
<p>Here are the configuration steps I took to realize this stack:</p>
<p><strong>1. Memcached Sessions</strong><br />
Using memcached for sessions gives me slightly better performance on my Rackspace VM because in-memory reading&amp;writing is hugely faster than reading&amp;writing to a virtualized disk. I went into a lot more detail about this last April when I wrote about <a href="http://www.alwaysgetbetter.com/blog/2011/04/09/memcached-session-handler/">how to use memcached as a session handler in PHP</a>.</p>
<p><strong>2. PHP FPM</strong><br />
The newest Ubuntu distributions have a package <strong>php5-fpm</strong> that installs PHP5 FastCGI and an init.d script for it. Once installed, you can tweak your php.ini settings to suit, depending on your system&#8217;s configuration. (Maybe we can get into this another time.)</p>
<p><strong>3. Nginx</strong><br />
Once PHP FPM was installed, I created a site entry that would pass PHP requests forward to the FastCGI server, while serving other files directly. Since the majority of my static content (css, javascript, images) have already been moved to a content delivery network, nginx has very little actual work to do.</p>
<p><code><br />
server {<br />
listen 80;<br />
server_name sitename.com www.sitename.com;<br />
access_log /var/log/nginx/sitename-access.log;<br />
error_log /var/log/nginx/sitename-error.log;<br />
# serve static files<br />
location / {<br />
root /www/sitename.com/html;<br />
index index.php index.html index.htm;</code></p>
<p># this serves static files that exists without<br />
# running other rewrite tests<br />
if (-f $request_filename) {<br />
expires 30d;<br />
break;<br />
}</p>
<p># this sends all-non-existing file or directory requests to index.php<br />
if (!-e $request_filename) {<br />
rewrite ^(.+)$ /index.php?q=$1 last;<br />
}<br />
}</p>
<p>location ~ \.php$ {<br />
fastcgi_pass 127.0.0.1:9000;<br />
fastcgi_index index.php;<br />
fastcgi_param SCRIPT_FILENAME /www/sitename.com/html$fastcgi_script_name;<br />
include fastcgi_params;<br />
}<br />
}</p>
<p>The <strong>fastcgi_param</strong> setting controls which script is executed, based upon the root path of the site being accessed. All of the requests parameters are passed through to PHP, and once the configuration is started up I didn&#8217;t miss Apache one little bit.</p>
<p><strong>Improvements</strong><br />
My next step will be to put a varnish server in front of nginx. Since the majority of my site traffic comes from search engine results where a user has not yet been registered to the site or needs refreshed content, Varnish can step in and serve a fully cached version of my pages from memory far faster than FastCGI can render the WordPress code. I&#8217;ll experiment with this setup in the coming months and post my results.</p>
<div style="width:468px;margin:0 auto">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-0410364841759590";
/* Homepage, 468x60 ads, After posts, created 12/19/08 */
google_ad_slot = "4210204644";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/12/20/fastcgi-nginx-performance-vm/' rel='bookmark' title='Using FastCGI with Nginx for Performance on a VM'>Using FastCGI with Nginx for Performance on a VM</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/09/memcached-session-handler/' rel='bookmark' title='Memcached as Session Handler'>Memcached as Session Handler</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2012/01/30/setting-wordpress-nginx-fastcgi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HP Releases Enyo 2.0</title>
		<link>http://www.alwaysgetbetter.com/blog/2012/01/25/hp-releases-enyo-20/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2012/01/25/hp-releases-enyo-20/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 01:56:27 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[WebOS]]></category>
		<category><![CDATA[enyo]]></category>
		<category><![CDATA[hp]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[webos]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=485</guid>
		<description><![CDATA[Now that WebOS is being made open source, HP has released a new version of the Enyo JavaScript framework. Whereas the first version of the framework only supported Webkit-based environments (like the HP Touchpad, or Safari or Chrome), the newer version has expanded support for Firefox and IE9 as well. Developers who created apps with [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/28/pintsized-mobile-devices/' rel='bookmark' title='Pint-Sized Mobile Devices'>Pint-Sized Mobile Devices</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Enyo Logo" src="http://cdn.precentral.net/resources/images/000/106/057/large/enyo-html5-palm-logos.png" alt="" width="330" height="169" />Now that WebOS is being made open source, HP has released a new version of the Enyo JavaScript framework. Whereas the first version of the framework only supported Webkit-based environments (like the HP Touchpad, or Safari or Chrome), the newer version has expanded support for Firefox and IE9 as well. Developers who created apps with the old framework will have to wait a little while longer before all of the widgets and controls from Enyo 1.0 are ported over.</p>
<p>What does this mean for app developers? Now that Enyo is open-source, it means applications built on the platform will run on Android and iOS. But it&#8217;s not a disruptive technology &#8211; both Android and iOS have supported HTML5 applications for quite awhile; HP will be competing against mature frameworks like jQuery Mobile.</p>
<p>As a WebOS enthusiast I am definitely going to put some time into continuing my explorations of Enyo, but it&#8217;s getting harder and harder to justify the investment. My Pre is getting pretty old at this point, and hardware manufacturers have yet to express interest in making new devices to take advantage of WebOS. If I end up switching to Android with my next hardware purchase, it&#8217;s going to shift my priorities away from Enyo and its brethren.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/28/pintsized-mobile-devices/' rel='bookmark' title='Pint-Sized Mobile Devices'>Pint-Sized Mobile Devices</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2012/01/25/hp-releases-enyo-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Upgrade Firefox using Ubuntu</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/08/06/upgrade-firefox-ubuntu/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/08/06/upgrade-firefox-ubuntu/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 18:57:43 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web Browsers]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=441</guid>
		<description><![CDATA[photo credit: jmerelo So I got tired of using Firefox 3.6 in my Ubuntu machine and decided to upgrade to the newest version (5.0). It&#8217;s understandable that the package maintainers responsible for Ubuntu don&#8217;t put bleeding-edge cutting-edge releases in the distribution due to the possibility of introducing unstable elements into the user experience. But Firefox [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/29/finding-ubuntu-version/' rel='bookmark' title='Finding Your Ubuntu Version'>Finding Your Ubuntu Version</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class=alignright><a href="http://www.flickr.com/photos/48600078653@N01/164408290/" title="Mochila Firefox" target="_blank"><img src="http://farm1.static.flickr.com/51/164408290_c1404c94fe_m.jpg" alt="Mochila Firefox" border="0" /></a><br /><small><a href="http://creativecommons.org/licenses/by-sa/2.0/" title="Attribution-ShareAlike License" target="_blank"><img src="http://www.alwaysgetbetter.com/blog/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" border="0" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a href="http://www.flickr.com/photos/48600078653@N01/164408290/" title="jmerelo" target="_blank">jmerelo</a></small></div>
<p>So I got tired of using Firefox 3.6 in my Ubuntu machine and decided to upgrade to the newest version (5.0). It&#8217;s understandable that the package maintainers responsible for Ubuntu don&#8217;t put <del datetime="2011-08-06T18:45:00+00:00">bleeding-edge</del> cutting-edge releases in the distribution due to the possibility of introducing unstable elements into the user experience. But Firefox 4 has been out for over a year, and the migration to 5 is well underway.</p>
<p>Fortunately, it couldn&#8217;t be much easier to get the newest official release using our good friend <strong>aptitude</strong>.</p>
<p>In a terminal window, add the Mozilla team&#8217;s stable Firefox repository by issuing the following command:</p>
<p><code><br />
sudo add-apt-repository ppa:mozillateam/firefox-stable<br />
</code></p>
<p>Next, perform an update to get the package listing, and upgrade to install the newest browser:</p>
<p><code><br />
sudo apt-get update<br />
sudo apt-get upgrade<br />
</code></p>
<p>That&#8217;s it &#8211; you&#8217;re done! Your shortcuts are even updated, and any bookmarks or open tabs you might have had on the go are carried forward.</p>
<p>I was pleasantly surprised at how easy this process was.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/29/finding-ubuntu-version/' rel='bookmark' title='Finding Your Ubuntu Version'>Finding Your Ubuntu Version</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/08/06/upgrade-firefox-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Pulled From Mac OS X Lion</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/08/05/mysql-pulled-mac-os-lion/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/08/05/mysql-pulled-mac-os-lion/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 13:41:47 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=439</guid>
		<description><![CDATA[Apple-based LAMP developers be warned: the new version of OS X does not include MySQL, which was formerly part of the developer tools shipped with the operating system. In its place look for deliciously Oracle-free PostgreSQL. Of course, developers can and will continue to download MySQL and install it themselves, but the out-of-box experience moving [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/18/memcache-mysql/' rel='bookmark' title='Using Memcache with MySQL'>Using Memcache with MySQL</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/03/24/drizzle-mysql-cloud/' rel='bookmark' title='Drizzle &#8211; MySQL for the Cloud'>Drizzle &#8211; MySQL for the Cloud</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/10/memcache-mysqls-hero/' rel='bookmark' title='Memcache as MySQL&#8217;s Hero'>Memcache as MySQL&#8217;s Hero</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Apple-based LAMP developers be warned: the new version of OS X does not include MySQL, which was formerly part of the developer tools shipped with the operating system. In its place look for deliciously Oracle-free PostgreSQL. Of course, developers can and will continue to download MySQL and install it themselves, but the out-of-box experience moving forward will be with PostgreSQL.</p>
<p>Although it is still an extremely popular database, Oracle&#8217;s presence in the MySQL world has put a chill over business users considering using the product as the backbone of their data solutions. <a href="http://www.alwaysgetbetter.com/blog/2011/03/24/drizzle-mysql-cloud/">Other databases with similar purposes exists</a> but none have the deep community boasted by PostgreSQL.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/18/memcache-mysql/' rel='bookmark' title='Using Memcache with MySQL'>Using Memcache with MySQL</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/03/24/drizzle-mysql-cloud/' rel='bookmark' title='Drizzle &#8211; MySQL for the Cloud'>Drizzle &#8211; MySQL for the Cloud</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/10/memcache-mysqls-hero/' rel='bookmark' title='Memcache as MySQL&#8217;s Hero'>Memcache as MySQL&#8217;s Hero</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/08/05/mysql-pulled-mac-os-lion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Azure Thoughts &#8211; First Six Months</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/08/02/windows-azure-thoughts-months/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/08/02/windows-azure-thoughts-months/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 10:00:51 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Windows Azure]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=434</guid>
		<description><![CDATA[Having played with Windows Azure for about six months or so, I think I have a good handle on its pros and cons for the tasks I&#8217;ve been trying to do. I definitely have a lot of positive conclusions about the platform as a whole, and a few pain points I can see Microsoft working [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/25/ensure-sla-multiple-web-role-instances-windows-azure/' rel='bookmark' title='Ensure SLA with Multiple Web Role Instances on Windows Azure'>Ensure SLA with Multiple Web Role Instances on Windows Azure</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/24/azure-table-storage-azure-sql/' rel='bookmark' title='Azure Table Storage vs Azure SQL'>Azure Table Storage vs Azure SQL</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Having played with Windows Azure for about six months or so, I think I have a good handle on its pros and cons for the tasks I&#8217;ve been trying to do. I definitely have a lot of positive conclusions about the platform as a whole, and a few pain points I can see Microsoft working hard to eliminate.</p>
<p>Starting with the good:</p>
<p><strong>Seamless Deployments &#8211; No Client Downtime</strong><br />
One of the trickiest things to set up while deploying a web cluster is the ability to deploy new builds without causing downtime, and reverting to the last build version in the event of a discovery of some critical flaw.</p>
<p>Azure really takes the pain out of this part of the process. Just deploy to staging, test the staging area, and hit &#8216;Swap VIP&#8217; to reverse the staging &#038; production instances. This is a great way to increase and decrease capacity as long as the end points remain the same (same number of ports, etc). (<a href="http://www.alwaysgetbetter.com/blog/2011/04/25/ensure-sla-multiple-web-role-instances-windows-azure/">Remember, you need to have 2 or more instances in order to invoke the SLA.</a>)</p>
<p><strong>Scalable Computing as it is Meant to Be</strong><br />
Most of the developer confusion I have encountered during these first months of development has turned out to be related to scalable programming in general and not Azure programming in particular. I haven&#8217;t been training people to use Azure so much as I have been promoting the importance of properly separating aspects of code to make use of data sources in a non-limiting way. Caching, database access, blob storage, table storage are not new concepts, but using them from the ground-up in every project has been new to most people.</p>
<p>We can&#8217;t develop with one web server in mind and then scale out, we now have to think about scaling right from the beginning, which is resulting in a much cleaner architecture overall. Developers become more connected to the practical results of their decisions when they have to <a href="http://www.alwaysgetbetter.com/blog/2011/04/24/azure-table-storage-azure-sql/">choose whether to use NoSQL, SQL or both for data access</a> based on factors ranging from speed to overall cost.</p>
<p><strong>Tight Code Cohesion</strong><br />
Working with Azure for me has meant a return to .NET and C# programming. Combined with the ASP.NET MVC 3 framework and latest SQL database versions, the experience has been overwhelmingly fun. It has been great to have code that just works nicely in an environment that has been clearly optimized for exactly what I&#8217;m trying to do. Not having to deal with server setup and maintenance has freed me to dive more deeply into the capabilities of the system without needing to worry about the configuration. In short, I&#8217;m loving this.</p>
<p>And the bad:</p>
<p><strong>Long Deploy Times</strong><br />
At one point our build times were pushing 45 minutes. This is a huge problem when it is 11 o&#8217;clock at night on launch day and you have a team of developers waiting around in order to verify their fixes.</p>
<p>During development the situation can be made easier with incremental pushes; since each Azure instance is a VM, it isn&#8217;t hard to upload the changed files through RDP and see changes immediately. For devving this is fine, but the changes are not persistent therefore the full deploy process of uploading the cspack file, provisioning instances and starting up is needed when moving production code into a live environment.</p>
<p>The process can definitely be sped up by reducing the overall project size; at one point we had several hundred megabytes of supporting files which didn&#8217;t need to be part of our project. Removing these basically eliminated our upload times, but the web role instantiation still clocks in at 15-20 minutes; a long time when you want to go home to your family.</p>
<p><strong>Slow System Responses</strong><br />
When I say slow system response, I am referring to the management API which hits the AppFabric, not the response times of our applications which have been incredibly strong.</p>
<p>Any time I manage our Azure account, I find myself waiting around for a lot of information. During deployments especially, the status messages are unhelpful &#8216;Creating deployment&#8217;, &#8216;Initializing instance&#8217;, &#8216;Instance busy&#8217;, etc. This is really frustrating given the long deployment times; having more transparency into the process would be a real confidence builder.</p>
<p><strong>Unclear Management Console</strong><br />
This is a bit nit-picky; the Silverlight-based management console is pretty cleanly laid out. Some of the configuration options are not clear, though. For example, to grant API access to your applications, you need to upload your certificate to the &#8216;Management Certificates&#8217; section, which is separate and unrelated to the Certificates folder subordinate to each hosted service. This makes sense for veterans of the system as both certificate groups serve different roles, but new users are easily confused by the distinction and can spend hours trying to figure out how to deploy their projects from Visual Studio.</p>
<p>Similarly, after uploading your certificate, you can get the subscription ID by clicking on the subscription and copying the ID from the info panel at the right-hand side of your screen. If you right-click on the subscription ID in the menu pane and choose the &#8216;Copy&#8217; option, it copies the creation date &#038; name of the subscription. Hardly a major problem, but potentially a stumbling block for developers new to the platform.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/25/ensure-sla-multiple-web-role-instances-windows-azure/' rel='bookmark' title='Ensure SLA with Multiple Web Role Instances on Windows Azure'>Ensure SLA with Multiple Web Role Instances on Windows Azure</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/24/azure-table-storage-azure-sql/' rel='bookmark' title='Azure Table Storage vs Azure SQL'>Azure Table Storage vs Azure SQL</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/08/02/windows-azure-thoughts-months/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding Your Ubuntu Version</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/04/29/finding-ubuntu-version/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/04/29/finding-ubuntu-version/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 01:15:39 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=425</guid>
		<description><![CDATA[Apart from the login screen, if you are using a Ubuntu computer and want to know the version number: > cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04.2 LTS" Related posts: How to Upgrade Firefox using Ubuntu
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/08/06/upgrade-firefox-ubuntu/' rel='bookmark' title='How to Upgrade Firefox using Ubuntu'>How to Upgrade Firefox using Ubuntu</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Apart from the login screen, if you are using a Ubuntu computer and want to know the version number:</p>
<p><code><br />
> cat /etc/lsb-release<br />
DISTRIB_ID=Ubuntu<br />
DISTRIB_RELEASE=10.04<br />
DISTRIB_CODENAME=lucid<br />
DISTRIB_DESCRIPTION="Ubuntu 10.04.2 LTS"<br />
</code></p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/08/06/upgrade-firefox-ubuntu/' rel='bookmark' title='How to Upgrade Firefox using Ubuntu'>How to Upgrade Firefox using Ubuntu</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/04/29/finding-ubuntu-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ensure SLA with Multiple Web Role Instances on Windows Azure</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/04/25/ensure-sla-multiple-web-role-instances-windows-azure/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/04/25/ensure-sla-multiple-web-role-instances-windows-azure/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 11:15:01 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[high availability]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=416</guid>
		<description><![CDATA[As I dig deeper into the Windows Azure platform, I am becoming more and more impressed by the potential it offers. Microsoft has put a lot of money and resources into developing their infrastructure and have done an incredible job at creating an interesting and powerful architecture. If anything, their major fault is in advertising [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/08/02/windows-azure-thoughts-months/' rel='bookmark' title='Windows Azure Thoughts &#8211; First Six Months'>Windows Azure Thoughts &#8211; First Six Months</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/24/azure-table-storage-azure-sql/' rel='bookmark' title='Azure Table Storage vs Azure SQL'>Azure Table Storage vs Azure SQL</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/11/04/multiple-development-environments/' rel='bookmark' title='Multiple Development Environments'>Multiple Development Environments</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>As I dig deeper into the Windows Azure platform, I am becoming more and more impressed by the potential it offers. Microsoft has put a lot of money and resources into developing their infrastructure and have done an incredible job at creating an interesting and powerful architecture. If anything, their major fault is in advertising &#8211; with so many different technologies with ever-changing names, it&#8217;s hard for a newcomer to wrap their mind around the services. It is pricier than some options so it&#8217;s hard to really experiment in much depth, although they do offer a free option for developers to dig in and try the services.</p>
<p><strong>Ensuring 99.95% SLA</strong><br />
One potential &#8216;gotcha&#8217; is the SLA: it differs between their difference services but hovers in the 99.9% range. Most account properties include automatic scaling and failover, but Web Roles and Worker Roles do not &#8211; in order to qualify for the 99.95% SLA you need to deploy your solution to two or more instances. By doing that, you ensure that your application is load balanced across multiple fault domains therefore will remain available <a href="http://www.alwaysgetbetter.com/blog/2011/04/23/surviving-cloud-failures/">even during a failure</a>.</p>
<p>Of course, this doubles the cost &#8211; each compute instance is billed separately.</p>
<p><strong>Fault Domain vs Upgrade Domain</strong><br />
Azure&#8217;s logical server space is segmented into fault domains and upgrade domains. Translated into physical terms, a fault domain refers to a single rack containing multiple computers, while an upgrade domain is one or more computers that receive software upgrades at the same time. Multiple upgrade domains may exist within any fault domain.</p>
<p>For our application to remain online, we need to consider where it is hosted. Although the fault and upgrade domains are largely abstracted away from developers, the SAL guarantees that 2 or more instances are split across two or more upgrade and fault domains. At a minimum, this means if you have two Web Role instances they will exist on different computers in different racks. Beyond that, Azure decides where instances are initialized and hosted from.</p>
<p><strong>High Availability Concerns</strong><br />
Now let&#8217;s consider our application which has been split across two instances. We are guaranteed to have 99.95% network availability to our application, but there are more factors to consider.</p>
<p>When one of the instances goes offline &#8211; due to a server fault or OS upgrade &#8211; Azure automatically starts it up on a working server. As long as the remaining instance is able to handle all of your application&#8217;s needs, this process is transparent and results in no performance degradation.</p>
<p>What happens if your application is spread across two instances, each under 70% load? The response times might be good, but if one of the instances goes offline even temporarily your remaining healthy deployment will trying to handle 140% of the overall traffic. If you want your business to stay on line, you need to plan for these periods of downtime.</p>
<p>This is where the abstraction hurts &#8211; we can&#8217;t control the number of fault domains in our cluster but we can control the number of upgrade domains (essentially forcing each instance to load up on a new machine). Worst case scenario is half of your cluster dies when the Azure fault domain goes down &#8211; something that <em>should</em> never happen, but anything can happen online.</p>
<p>Note, however, that this kind of planning is what&#8217;s needed in general cases when your traffic might suddenly jump due to customer interest. We&#8217;re not just mitigating against host failure, but also against reputation damage from inadequate planning.</p>
<p><strong>Keep Sessions in Mind</strong><br />
One last thing to mention: when we split our application into multiple instances, we need to consider how we handle session data. Since Azure uses a round robin situation for their load balancing meaning the end user could potentially hit a different instance each time they access a resource on your site. If you are using traditional session handlers, session data is not shared between the instances so user data is not guaranteed to be persisted on each request.</p>
<p>This is actually huge benefit to cloud computing, and something <a href="http://www.alwaysgetbetter.com/blog/2011/04/11/play-framework-saves-world/">I&#8217;ve praised other frameworks</a> for providing seamless support for. Our web application should be designed to avoid sharing data where possible. If session data is needed, we can use AppFabric&#8217;s session cache providers to provide fast network-based session management.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/08/02/windows-azure-thoughts-months/' rel='bookmark' title='Windows Azure Thoughts &#8211; First Six Months'>Windows Azure Thoughts &#8211; First Six Months</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/24/azure-table-storage-azure-sql/' rel='bookmark' title='Azure Table Storage vs Azure SQL'>Azure Table Storage vs Azure SQL</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/11/04/multiple-development-environments/' rel='bookmark' title='Multiple Development Environments'>Multiple Development Environments</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/04/25/ensure-sla-multiple-web-role-instances-windows-azure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Azure Table Storage vs Azure SQL</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/04/24/azure-table-storage-azure-sql/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/04/24/azure-table-storage-azure-sql/#comments</comments>
		<pubDate>Sun, 24 Apr 2011 11:30:54 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[data types]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[planning]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=414</guid>
		<description><![CDATA[There is a lot of debate among newcomers to Azure whether to use Azure SQL or file-based Table Storage for data persistence. Azure itself does not make the differences very clear, so let&#8217;s take a closer look at each option and try to understand the implications of each. Azure SQL Azure SQL is very similar [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/08/02/windows-azure-thoughts-months/' rel='bookmark' title='Windows Azure Thoughts &#8211; First Six Months'>Windows Azure Thoughts &#8211; First Six Months</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/25/ensure-sla-multiple-web-role-instances-windows-azure/' rel='bookmark' title='Ensure SLA with Multiple Web Role Instances on Windows Azure'>Ensure SLA with Multiple Web Role Instances on Windows Azure</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>There is a lot of debate among newcomers to Azure whether to use Azure SQL or file-based Table Storage for data persistence. Azure itself does not make the differences very clear, so let&#8217;s take a closer look at each option and try to understand the implications of each.</p>
<p><strong>Azure SQL</strong><br />
Azure SQL is very similar to SQL Server Express. It is meant as a replacement for SQL Server Standard and Enterprise, but the feature set is not there yet. Reporting services, in particular, are in community technology preview (CTP) phase and at the time of writing are not ready for prime time.</p>
<p>Programmatically, Azure SQL is very similar to SQL in existing web applications; any ODBC classes you already wrote will work directly on Azure with no changes.</p>
<p>Size and cost are the major limitations with Azure SQL in its current incarnation. The largest supported data size is 50GB which runs for $499/month. Any databases larger than 50GB would need to be split across multiple instances &#8211; this requires knowledge of sharing at the application level and is not easy surgery to perform.</p>
<p><strong>Table Storage</strong><br />
Table storage uses a key-value pair to retrieve data stored on Azure&#8217;s disk system, similar to the way <a href="http://www.alwaysgetbetter.com/blog/2011/04/18/memcache-mysql/">memcache and MySQL</a> work together to provide the requested data at fast speeds. Each storage container supports 100TB of data at incredibly cheap ($0.15/GB) rates.</p>
<p>Working with table storage involves accessing them directly from your application differently than you may be accustomed to with SQL. Going all-in ties you to the Azure platform &#8211; which is probably not a problem if you&#8217;re already developing for Azure as you will likely be trying to squeeze every ounce of performance out of all areas of the platform anyway.</p>
<p>Table storage does not support foreign key references, joins, or any of the other SQL-stuff we usually use. It is up to the programmer to compensate by making wide de-normalized tables and build their lists in memory. If you&#8217;re already building clustered applications, this is not a new design pattern as developers typically want to cache data in this manner.</p>
<p>Besides the larger space limits, table storage affords us automatic failover. Microsoft&#8217;s SLA guarantees we will always be able to access the data, and this is accomplished by replicating everything across at least three nodes. Compared to self-managing replication and failover with the SQL service, this is a huge advantage as it keeps the complexity out of our hands.</p>
<p><strong>Difference in Evolution</strong><br />
If Azure SQL seems somewhat stunted compared to Table Storage, it&#8217;s not an accident: it is a newcomer who was not planned during the original construction of the Azure platform. Microsoft carefully considered the high-availabilty trends used for application development and found that the NoSQL way would most easily scale to their platform. Developer outrage prompted the company to develop Azure SQL, and its service offerings are improving rapidly.</p>
<p>Depending on your storage needs, your course of action may be to store as much data for cheap in Table Storage, and use SQL to index everything. Searching the SQL database will be incredibly fast, and can be done in parallel with any loads against persistent tables &#8211; everybody wins.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/08/02/windows-azure-thoughts-months/' rel='bookmark' title='Windows Azure Thoughts &#8211; First Six Months'>Windows Azure Thoughts &#8211; First Six Months</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/25/ensure-sla-multiple-web-role-instances-windows-azure/' rel='bookmark' title='Ensure SLA with Multiple Web Role Instances on Windows Azure'>Ensure SLA with Multiple Web Role Instances on Windows Azure</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/04/24/azure-table-storage-azure-sql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cloud Computing Is Not Magical</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 01:59:53 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[customer service]]></category>
		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=237</guid>
		<description><![CDATA[Back in 2009 I was tired of hearing the phrases &#8220;cloud computing&#8221; and &#8220;in the cloud&#8221;. These days I&#8217;m so numb to their meaninglessness that it doesn&#8217;t even phase me anymore. Somewhere along the way marketers took over the internet and &#8216;social media&#8217; became a job position. So what do I have against cloud computing? [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/23/surviving-cloud-failures/' rel='bookmark' title='Surviving Cloud Failures'>Surviving Cloud Failures</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/03/24/drizzle-mysql-cloud/' rel='bookmark' title='Drizzle &#8211; MySQL for the Cloud'>Drizzle &#8211; MySQL for the Cloud</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/16/small-site-big-footprint/' rel='bookmark' title='Small Site, Big Footprint'>Small Site, Big Footprint</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Back in 2009 I was tired of hearing the phrases &#8220;cloud computing&#8221; and &#8220;in the cloud&#8221;. These days I&#8217;m so numb to their meaninglessness that it doesn&#8217;t even phase me anymore. Somewhere along the way marketers took over the internet and &#8216;social media&#8217; became a job position.</p>
<p>So what do I have against cloud computing? Would I rather build servers, deal with co-location, and suffer massive downtimes in order to change hardware specs? Of course not.</p>
<p>Let&#8217;s not lose sight of the big picture: virtualized servers are still servers. From a remote perspective the management is all the same and from a hardware perspective you still need to be responsible for your data in the event of a catastrophic failure.</p>
<p>While I am a huge proponent of &#8220;cloud&#8221; providers like Rackspace (heck I host all of my web sites on Cloud Server instances), let&#8217;s call a spade a spade: there is nothing magical about servers in the cloud, they are just virtualized instances running on a massively powerful hardware architecture.</p>
<p>Why go with virtualization over a dedicated box? Virtual servers are <em>cheap</em> &#8211; I don&#8217;t need to incur the startup costs that I would from a dedicated server. For a small business this is a huge deal; for larger business with intense data needs the dedicated solution will always provide the most security but for anything from tiny, small to very large applications the virtualized way is the ticket. Add more servers, remove them, reconfigure: you don&#8217;t get that kind of flexibility from traditional server hosting.</p>
<p>Long live cloud computing; but the name has to go. Did the term come from network diagrams where the Internet was represented as a cloud? I don&#8217;t think it&#8217;s a particularly clever analogy to consider your business assets living as disembodied entities &#8220;somewhere&#8221; in the networking cloud.</p>
<p>We&#8217;re fighting a losing battle if we believe we&#8217;re going to get the marketers to back off the internet now. But on the tech side let&#8217;s keep calling it what it is and try not to let the marketing buzz cloud our opinion of the technologies we use.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/23/surviving-cloud-failures/' rel='bookmark' title='Surviving Cloud Failures'>Surviving Cloud Failures</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/03/24/drizzle-mysql-cloud/' rel='bookmark' title='Drizzle &#8211; MySQL for the Cloud'>Drizzle &#8211; MySQL for the Cloud</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/16/small-site-big-footprint/' rel='bookmark' title='Small Site, Big Footprint'>Small Site, Big Footprint</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cheap File Replication: Synchronizing Web Assets with fsniper</title>
		<link>http://www.alwaysgetbetter.com/blog/2010/11/14/cheap-file-replication-synchronizing-web-assets-fsniper/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2010/11/14/cheap-file-replication-synchronizing-web-assets-fsniper/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 17:31:44 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=341</guid>
		<description><![CDATA[Awhile ago I wrote about how I was using nginx to serve static files rather than letting the more memory-intensive Apache handle the load for files that don&#8217;t need its processing capabilities. The basic premise is that nginx is the web-facing daemon and handles static files directly from the file system, while shipping any other [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/03/04/defaulting-null-variables/' rel='bookmark' title='Defaulting Null Variables'>Defaulting Null Variables</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/09/memcached-session-handler/' rel='bookmark' title='Memcached as Session Handler'>Memcached as Session Handler</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Awhile ago I wrote about how I was <a href="http://www.alwaysgetbetter.com/blog/2010/09/25/give-apache-break-nginx/">using nginx to serve static files</a> rather than letting the more memory-intensive Apache handle the load for files that don&#8217;t need its processing capabilities. The basic premise is that nginx is the web-facing daemon and handles static files directly from the file system, while shipping any other request off to Apache on another port.</p>
<p>What if Apache is on a different server entirely? Unless you have the luxury of an NAS device, your options are:</p>
<p><strong>1. Maintain a copy of the site&#8217;s assets separate from the web site</strong><br />
There are two problems with this approach: maintainability, and synchronization. You&#8217;ll have to remember to deploy any content changes separately to the rest of the site, which is counter-intuitive and opens up your process to human error. User-generated content stays on the Apache server and would be inaccessible to nginx.</p>
<p><strong>2. Use a replicating network file system like GlusterFS</strong><br />
Network-based replication systems are advanced and provide amazing redundancy. Any changes you make to one server can be replicated to the others very quickly, so any user generated content will be available to your content servers, and you only have to deploy your web site once.</p>
<p>The downside is that many NFS solutions are optimized for larger (>50Mb) filesizes. If you rely on your content server for small files (images, css, js), the read performance may decline when your traffic numbers increase. For high availability systems where it is critical for each server to have a full set of up-to-date files, this is probably the best solution.</p>
<p><strong>3. Use an rsync-based solution</strong><br />
This is the method I&#8217;ve chosen to look at here. It&#8217;s important that my content server is updated as fast as possible, and I would like to know that when I perform disaster recovery or make backups of my web site the files will be reasonably up to date. If a single file takes a few seconds to appear on any of my servers, it isn&#8217;t a huge deal (I&#8217;m just running WordPress).</p>
<p><strong>The Delivery Mechanism</strong><br />
rsync is fast and installed by default on most servers. Pair it with ssh and use password-less login keys, and you have an easy solution for script-able file replication. The only missing piece is the &#8220;trigger&#8221; &#8211; whenever the filesystem is updated, we need to run our update script in order to replicate to our content server.</p>
<p>Icrond is one possible solution &#8211; whenever a directory is updated icrond can run our update script. The problem here is that service does not act upon file updates recursively. <strong>fsniper</strong> is our solution.</p>
<p>The process flow should look like this.<br />
1. When the content directory is updated (via site upload or user file upload), fsniper initiates our update script.<br />
2. Update script connects to the content server via ssh, and issues an rsync command between our content directory and the server&#8217;s content directory.<br />
3. Hourly (or whatever), initiate an rsync command from the content server to any web servers &#8211; this will keep all the nodes fairly up-to-date for backup and disaster recovery purposes.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/03/04/defaulting-null-variables/' rel='bookmark' title='Defaulting Null Variables'>Defaulting Null Variables</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/09/memcached-session-handler/' rel='bookmark' title='Memcached as Session Handler'>Memcached as Session Handler</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2010/11/14/cheap-file-replication-synchronizing-web-assets-fsniper/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/

Served from: alwaysgetbetter.com @ 2012-02-05 03:54:44 -->
