ProBLOG™

Running on Clouds

Traditionally, the three flavors of web hosting consists of shared hosting, virtual private hosting, or dedicated hosting.  

In a shared environment, your site sits on the same server as hundreds or perhaps thousands of others.  This is typically the cheapest option, and different hosting companies allow a variety of different features.  Usually, you'll have the ability to run server side scripts such as Perl or PHP, have access to a database server such as MySQL, and a variety of other features.  For most sites with a limited amount of traffic, low security concerns, and generic requirements, this is a great option, especially since there are companies that will host your site for under $10/month.

Dedicated hosting is where you rent a server and have all of its resources to yourself.  This is much more expensive than shared hosting, but it has traditionally been the best option for sites with specific needs, lots of traffic, and consumes lots of computer resources.  Dedicated plans start at around $100/month and go up to many thousands.

Virtual hosting is a hybrid of the shared and dedicated models.  Relatively few users are on the same server, and each has their own installs of the programs that they use.  For example, each would have their own install of MySQL, Apache, etc.  This tends to be priced in the middle of dedicated and shared hosting and works well for sites with specific needs, but not huge amounts of traffic.

The problem with each of these plans is that it's somewhat difficult to estimate how much computer resources your site is going to need because of the possibility that your site may be featured by a large site, which will drive more traffic than your server can handle.  If you go over your limit on a shared plan, the hosting company will turn off your site for a period of time so that you don't bring others down.  If you have more traffic than your dedicated server can handle, people will see their pages loading slowly or they may see errors such as 'too many connections'.  To account for this, many people get into plans that far exceed what they need on a regular basis, which ends up costing much more than they should have to pay.

The solution to this is cloud computing.

Cloud computing is similar to virtual hosting in that you don't have dedicated computers at your disposal.  Instead, the cloud is a server farm with many thousands of computers all acting as one.  A person is then able to create server instances that use slices of the overall cloud.  This allows for very flexible configurations and makes it possible to increase resources very quickly when needed.  Each instance has its own operating system and all the programs and data that go along with it, and works for both Windows and Linux servers.

For example, let's say a person has one instance running a LAMP server (Linux, Apache, MySQL, and a Programming language such as Perl or PHP).  Using Apache's Proxy or another Proxy server program, it has the ability to load balance website views.  At first, the proxy hands off each request to itself.  A short while later, the company starts a major marketing campaign that is going to last for 6 weeks during the holiday season, but drops off dramatically at the first of the year.  The company can then bring up as many new instances as needed, and configure the proxy server to load balance between them.  On January 1st, the company shuts down those extra instances, and they're back to their single one.  This way, during their traffic spike, they have the resources needed, and aren't spending extra money on hosting when they don't.

There are companies such as RightScale that help automate this process for clouds such as Amazon's EC2.  Using their system, they can make it possible for instances to be spawned automatically when the site reaches configurable threshholds such as when processor reaches 80% usage for 30 minutes.  When the load drops back down, it removes the instance so that the site's capacity can ebb and flow with its traffic.  Sudden spikes are no longer a concern, and the cost savings because of it can be huge.

Since cloud computing only charges you for what you actually use, there's another benefit... staging servers.  You can set up an instance exactly like your production environment to test new site features.  Once it's fully tested, you can turn it off and you only paid for the time it was actually turned on.  This way, you're not affecting your production environment with testing, but you can test the exact production set up instead of just from your local machine.  In the past, you had to have dedicated machines that just sat there for days or weeks at a time doing nothing except during the testing phase.  Now, you don't have that expense.

 

Tags: amazon ec2, cloud hosting, cloud technology, web hosting