fromJune 2014

Caffeinated Drupal

Cloudy with a Chance of Drupal

A coffee’s varietal and geographic location are two of the main factors which contribute to its overall flavor in the cup. A third factor, which many coffee drinkers may not be so aware of, is the altitude where the coffee is grown. Altitude can make a profound difference on a coffee’s flavor. With a few notable exceptions (Hawaiian Kona comes to mind), the best coffee in the world comes from farms in higher elevations — generally over 3,000 feet. It’s not a large stretch to say that most of the world’s best coffee is grown in the clouds.

Today’s coffee recommendation — a Guatemala Antigua Finca Cabrejo, served as an Americano — is no exception. Its sweet, fruity flavor (amazing hints of pear with some honey sweetness) makes the perfect companion for our trip to the cloud(s).

Like coffee, Drupal has also experienced great success growing in the cloud.

With some upfront investment in deployment and configuration management tools, which I’ll get into below, cloud infrastructures can be easily scaled up and down to meet peak demand. Acquia and Pantheon, two of the largest Drupal hosting companies, are both powered by such cloud technologies. These companies provide great services for many types of Drupal sites, but they aren’t a perfect fit for everyone. Many people choose to host sites on their own, either on dedicated hardware or on a private or public cloud where they have more flexibility to modify the underlying servers as they see fit.

Hosting on virtual machines in a public cloud has a great allure; it has a very low up-front cost and, on the face of it, seems like it could be easily scaled up to meet increasing demand. I would say this is the greatest fallacy of hosting in the cloud.

While it’s true that you could easily create new virtual machines, a large investment in deployment scripts and/or configuration management tools is required in order to automate the process. This up-front investment is very often overlooked when evaluating hosting options, and, depending on the infrastructure requirements for a site, can require quite a lot of work to setup and maintain. It’s like trying to grow a cheap robusta coffee at high altitude in Guatemala — it will still end up tasting like the bottom of your shoe: Just because you have the right environment to grow does not mean you’ll end up with an ideal infrastructure (or cup of joe).

There are a few things you can do which will help provide a stable and dynamically growing infrastructure in the cloud. While these guidelines could also be applied to physical hardware, cloud hosting brings them front and center due to the dynamic and sometimes unpredictable nature of hosting on virtualized hardware.

Configuration Management

Almost everyone involved in system administration understands the importance of configuration management. However, it’s rare for people to take the time to build configuration management scripts that can take a server from scratch to a fully-built and functional server without any interaction. The devil is in the details here, and small inconsistencies – like having your configuration execute out of the expected order – could mean a failed deployment of a new server.

You also must be sure that all configuration is scripted. In most cases, everything needs to be automated in order for your infrastructure to scale on demand.


Monitoring is always important, but with virtual machines there are even more aspects to consider. For example, what if the physical server hosting one of your virtual machines has a bad disk which deteriorates I/O for all VMs currently running there? You have no insight into that physical machine, so, unless you are monitoring I/O performance, it could take quite a while to track down why your site is suddenly crawling along.

Disaster Recovery

Taking the previous example a step further, what would happen if the host server went completely offline, taking your virtual machine(s) with it? That consequence is not just likely, but likely by design.

Not only do you need monitoring in place to alert you as soon as this happens, but you also need to be able to spin up new virtual machines to replace those that went offline. An actionable – and preferably automated – disaster recovery plan is a must.

The cloud isn’t a magic bullet, but for many people it provides an ideal hosting environment. By keeping these points in mind, you can spend less time frantically configuring new servers as a rush of traffic hits your site, and more time enjoying that cup of coffee while your site hums along in the cloud.