After months of discussion on the virtues of cloud servers and Nginx, I was recently tasked with moving all the Nooku sites over to Rackspace Cloud. With that in mind, I have documented the basic install process for the benefit of all.

For our install, we will be using Ubuntu 10.04 and installing/configuring:

  • PHP 5.3.x (using fpm-php which is included)
  • MySQL 5.x
  • Nginx 8.x
In this tutorial I will take you through the install and the outline how I have set things up to gain maximum performance.

Recently I have been working on the demo server that will house our various demo sites.

One of the common issues with a demo site is that to preserve its integrity you may need to either restrict access or have a periodic rebuild. Restricting access may work sometimes but it’s likely to inhibit people trying out anything that is administrative in nature. Hence rebuilding the site is a far more appealing alternative.

The idea is basically delete everything and replace with a fresh copy, but to do so with minimum downtime. The result should be  a quick and secure rebuild. With that in mind we set about creating bash script that would rebuild the site as often as required (run as a cron job).

To get started I mapped out the process.

Site rebuilt workflow

As you can see we do everything using version control which in this case happened to be subversion.

By updating then exporting into a temp folder, the longest part of the process is done prior to any impact on the site. I threw in the checkout logic so that the same script could be used to build a brand new site (as in, one that does not already exist).

The first impact on the public site is the dropping of the database unless there have been changes to the repository that required database modifications.

For a typical site the whole process takes 13 seconds when no changes have been committed to subversion, with less than 2 seconds of downtime.
… continue reading …


MySQL Logo As some would be aware we have been working on a multi-site installation of Joomla! that is running in excess of 130 sites for the Belgium Police. Needless to say performance is paramount hence we have spent a considerable amount of time researching and deploying the right server technologies. This has included the use of Nginx rather than Apache, APC for opcode caching and a little gem in MySQL called query_cache.

Query cache is something that to my knowledge only existed in MySQL until Oracle released 11g. It’s not the same as the caching historically found in Oracle and Microsoft SQL, both of which would cache the method/procedure but not the result set.

MySQL’s query cache is a must have configuration which is as simple to configure as to allocate it with some memory. To see if you’re already running it try this in command line…

… continue reading …