Hottest topic in IT 

You may (or may not) have noticed that there’s A LOT of talk about cloud computing these days. The problem with all this chatter is that it’s incredibly hard to follow. There seems to be a wealth of different definitions of just what cloud computing actually is, and not without good reason. The “cloud” is a pretty ambiguous term, and as such anything attached to it only makes the whole thing a little more ambiguous. Rather than go off on a rant about how all this confusion is leading to a lot of misconceptions about various cloud-based services, let me clarify what I’m going to talk about. This will not be a discussion of certain SaaS stuff living in the cloud (like gmail, twitter, etc.), but rather actual cloud-based computing services and why you need to be using them.

What is Cloud Computing ?

So, before we get into the why, let’s go over the what a little bit more (if you’re familiar with services like EC2 or S3, feel free to skip this part). In a nutshell, cloud computing is really nothing more than virtualized private servers on steroids. Traditionally, if you wanted to host a site or app you would either get a shared hosting account somewhere, or get your own dedicated box (or many boxes). This generally works fine, but there are a lot of drawbacks to the so-called traditional way of doing things. We’ll get into this in a little bit, but for the moment we only need to know that these solutions involved actual physical servers. A dedicated server is just that, a dedicated piece of hardware for you to use… shared hosting is similar in the fact that you’re merely a tenant on a dedicated server (you could relate it to renting an apartment vs. owning a home).


Anyway, cloud computing is essentially the same as dedicated hosting, except for one very important distinction: you’re not using a physical server, your server is virtualized. That’s it, it’s really that simple! However, this simplicity has a lot of very important benefits that lead it to beat the hell out of any traditional hosting situation. It also has one very significant draw-back as well. We’ll get into these next…

Why Cloud Computing is Awesome !

Before we get into any drawbacks of this “cloud” stuff, let’s go over all the great things about it.

It’s Cheap

Cloud hosting is super-cheap compared to traditional dedicated hosting. A cloud-based server doesn’t take up space in racks, doesn’t required dedicated hardware, or any of the other costly stuff that physical servers require. Instead, one uber-powerful server can host several virtual servers, thus cutting down on costs at the data center, which gets passed to us.

On top of that, a lot of cloud hosting providers only charge you for what you use. If you only need a server for a few days / weeks for testing, you only need to pay for the time it was up and running. No commitments, no monthly charges whether you use the server or not, nothing. Awesome.

It’s Reliable

Early adopters of cloud hosting will tell you horror stories about their cloud servers randomly disappearing and other fun stuff like that, but this is no longer the case with any of the providers. This simply doesn’t happen any more. That aside, the fact that your server is virtualized adds a ton of other reliability benefits. Think about it, you don’t have any physical RAM, CPU, or hard drives to fail. Even better, the aforementioned uber-servers that your cloud server lives on take redundancy to the extreme, so there’s no reasonable worry about the host machine’s hardware failing, thus causing your server to fail. To make matters better, if in the rare event that the host machine fails, guess what? Your virtual server is simply (and quickly) moved to a server that doesn’t have issues. How cool is that?

It get’s better. Unlike shared hosting (which you should never use, which is another article I suppose) where your site shares resources with all the other shared sites on the server, you get dedicated resources. Imagine you’re on a shared host and somebody else’s site gets a huge traffic spike… their site will start to consume a ton of server resources, which get robbed from your site. With cloud hosting, this doesn’t happen. You get a guaranteed share of ram, disk, and CPU… same as you would with a dedicated server.

Finally, backups of cloud servers are super-reliable and super-awesome. With dedicated hosting, you can easily set up automated back-ups on your server, but those never back everything up. You still have to write cron jobs to do database dumps as the automated backup stuff won’t ever touch an active database data file, and you still have to say what it is you want backed up outside of that. With cloud hosting, your WHOLE SERVER is backed up. Remember, it’s virtualized, so a backup is nothing more than a snapshot. Like I said, super-awesome.

It’s Fast to Set Up

SInce everything’s virtual, you can usually get a cloud server up and running in minutes. There’s no hardware to plug into a rack, no servers to purchase, none of that junk. You just (essentially) tell the hosting provider you want a server, and they create it for you. This means that you can create and destroy servers as you need them, without having to make all sorts of plans in advance or waiting around.

It’s SUPER Scalable

One of the biggest draw-backs with dedicated hosting (or shared for that matter) is that you can’t scale easily, or even at all. You get a server with a certain amount of RAM and disk space, and whatever CPU happened to be installed, and you’re stuck. If you want to add more RAM, you usually end up paying through the nose for it… same with disk space. And if you want a newer CPU, you get a new server.

Imagine your app gets a traffic spike and your machine gets overloaded. How fast can you get another server set up to accommodate the load? At best, with dedicated hosting, 24 hours, and then you’ve still got to set everything up and possibly deal with load balancers, etc. Say you go ahead and do that, and the traffic spike drops after a month. What now? You’ve got way more computing power than you need, and you probably can’t get rid of the extra server easily… so you’re stuck with it (more money, more problems).

Well, this doesn’t happen with cloud servers. If you get a traffic spike, you simply scale the server up. More often than not, you simply need more RAM to deal with high load on your server. Guess what? Since your cloud server is virtualized, more RAM is only a matter of having the hosting provider allocate it to your machine. This usually involves a few clicks in a web interface, and a few more minutes for the scaling to happen. Even better, when you no longer need the extra resources, you can just as easily scale down. No headaches, and you don’t need to spend a ton of money to do it (which also goes back to the cheapness of cloud hosting).

Even if more RAM won’t cut it (maybe you need another database server or something like that), spinning up new sites is easy. Hell, you can usually clone your current server (or one of your servers if you have several) from one of your snapshots. So, not only can you get a new server up in minutes, but it’s already got everything ready and running on it. More awesomeness.

The Drawback of Cloud Hosting

Despite all the goodness we just went over, there’s one big problem with cloud hosting / computing. You have to set everything up yourself. There’s no control panel (unless you install one), nothing. When you spin up a server, you get a root password and a clean OS install. If you don’t know what you’re doing, or how to set things up, you’re in for a long and arduous set up process.

But things aren’t as bad as it seems. There are a lot of really well-written tutorials out there, often written by the hosting provider, that will walk you through getting your servers set up however you need them to be. Even better, there are also some really cool services in the works that will take care of this setup for you (one of which I’m working on… stay tuned ). So, this issue is rapidly becoming moot, but it’s still important to mention and acknowledge.

Why All This is Important to PHP Developers

You are probably asking yourself why this matters to you as a PHP developer… and with good reason. More often than not, the traditional ways of doing things have been more than adequate for us. Very often, the “best practice” setup for development has been to set up a local development environment with XAMPP/WAMP/MAMP, and to buy cheap shared or dedicated hosting somewhere for the actual site / app to run in production on.

I, however, think this approach sucks. As easy as stuff like XAMPP is, it’s always got shortcomings. If you want to try and use any technology that isn’t bundled with these packages, you’re pretty screwed (try and set up memcache on windows… lemme know how that goes). There are so many cool new technologies out there that I see many developers ignoring simply because there’s no easy way to work with them from a development perspective. Honestly, are you going to waste a ton of time trying to recompile PHP to include the bundled GD libraries, or some other thing, or installing software like Image Magick, Sphinx, Memcache, APC, whatever? It’s not always easy, so it’s rarely tackled. Perhaps you want to play around with PHP 5.3 or MySQL 6, or Postgres, MySQL replication or something else because you’re curious… how do you do this locally?

If you’re savvy, your answer to me would probably be to set up a local VM with VMware or VirtualBox. Not a bad answer, but those are a pain sometimes too. Local VMs can take valuable resources from your machine, and if you’re using an IDE, you’re probably already short on RAM (especially those of you using eclipse or eclipse-based IDEs). So you’ll turn these VMs on or off when you need them, but that’s also a pain.

Let’s take it one step further… You probably work on lots of different projects. If you’re like me, you run these all against some local Apache installation in subfolders while you’re developing (i.e. localhost/projecta and localhost/projectb). Well, that’s not a real representation of how things are going to run in production, which is never a good thing. You probably also use SVN or Git (if you don’t use SCM for development, start. Trust me, do it), and you probably just host that stuff locally. This is also less than ideal.

I’m sure you see where I’m going with all this. All these problems can be solved with cloud hosting. I don’t feel like I need to go into great detail here, as these solutions should be pretty self-evident. Think about it… if you want to play around with PHP 5.3 or some other new technology, you need only spin up a cloud server for a few days / weeks and do so. It’s cheap, easy, and you won’t run the risk of borking whatever local dev environment you’ve got set up.

But there’s a bit more to it than that. Say you want to test a migration from one version of something to another, or an upgrade process for an app you’ve written. If you’ve got an environment set up in a cloud, you need only take a snapshot of your server’s current state and then attempt the migration / upgrade / whatever. If something gets screwed up, revert to the snapshot and try again… that easy. You can’t argue that this isn’t a much better alternative to trying to do this with a dedicated server or local dev environment.

Finally, it’s simply a better way to develop. I’ve got a local XAMPP install that I use, admittedly, but I’ve also got several servers in the cloud. All my wiki, source control, and other important dev-related stuff lives on a dev server I’ve got set up in the cloud. It’s backed up, it works, and I’ve got total control over how it’s set up. I’ve also got a few other dev / production servers set up (this site is running on one) for my various rails / php projects that I work on. I can easily play around with new stuff without worrying about screwing anything up, I can keep all my development and testing properly isolated (I know people who run their dev and production environments on the same dedicated server… that’s playing with fire my friends), and everything just works.

If you want know more about cloud computing download tutorials from here

My favourite videos

Free Web Hosting