Archive

Archive for the ‘linux’ Category

Why I decided to host website using Amazon EC2

October 2, 2009 23 comments

Summary

Cloud computing is something, we been listening and reading about from past couple of years.  From my perspective, it is virtual machines running on virtualized hardware. Hence giving us dual benefit of running any image on any kind of hardware. We can dynamically launch any image and also dynamically expand/reduce available hardware capacity. Hence the word ‘Elastic’ & ‘Cloud’. In cloud computing world, amazon is more established compare to others.  So rest of article will use Amazon EC2. Amazon elastic computing allows user to launch any image (from their growing library of public images). They are called ‘AMI’s. You pay per use of images. (hourly usage rate plans). Hence it makes it easy to choose any image w/o binding to any contract.

Why cloud computing is better than tradition web hosting?

Answer is, it is not. If you looking to run simple apache web server and few php based applications then web hosting companies give best pricing and pre-configured applications.  Decision comes, if you looking for better hardware and more RAM for your applications.

Pros, Comparing amazon EC2 smallest image & virtual private server (VPS) plans.

  1. Amazon EC2 guarantees one CPU core whereas 4-5 VPS images run per CPU core.
  2. RAM available is 1.7GB for EC2 instance and VPS gives maximum of 512MB to 756MB (for plans >$40/mo) (for simultaneous multiple J2EE web applications, you wish for more RAM.)
  3. Available capacity is elastic. You can expand it as required, compare to fixed capacity available in VPS/Dedicated plans.
  4. Once you finished configuring your images, you can make current installation as another image incase you want multiple instances running.
  5. Amazon EC2 instance are running with better reliable infrastructure comparing.
  6. If you pre-pay for EC2 account, your average cost of running website 24×7, for whole month comes to $42 something, which is comparable to good VPS plans with lots of memory.

Hence comparing to dedicated hosting, amazon ec2 seems to be better option, if we start comparing relability factor, ability to instantly increase computing capacity, price and many other options.

I decided to give it try to move my website.

Other factors to consider

  • 1.7 GB of available RAM and 160 GB of drive capacity, gives me chance to run java apps w/o worrying about available memory.
  • It was learning experience for me, (as average user of linux OS).
  • It’s easy to install applications on ubuntu image. (same goes for other OS like fedora/centOS).
  • I can run MySQL & PostGres DB server together, as required.
  • Java tomcat web server seems to be good enough, but I can try some other servers like glassfish or jboss for better experience.
  • Using it as subversion server. Ping time & bandwidth is better than other servers.
  • Will be using as build server & agent both. (Most probably open source project ‘Hudson’).
Categories: aws, Java, linux Tags: , ,