Home > aws, Java, linux > Why I decided to host website using Amazon EC2

Why I decided to host website using Amazon EC2

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: , ,
  1. October 3, 2009 at 3:13 pm

    I would be very interested to hear about your experience with EC2 in more detail. That is a *ton* of RAM for the price! How about an update in a week or two? 🙂

  2. Kirs
    October 3, 2009 at 7:43 pm

    Is there a one time set up fee for Amazon EC2? I want to set up a small development site that I can play with over the weekends. If I turn off my EC2 instances during the weekdays, I should not incur any costs. Any thoughts on that?

    Thanks for the article.

  3. Thai Dang Vu
    October 3, 2009 at 8:56 pm

    I prepaid an Amazon EC2 for a whole year (about $350 at that time). I chose Ubuntu 8.04 image. This is the cost for using it:

    – $350 for a whole year
    – 3cents/hour if your image is on.
    – some very small amount of money (for every giga bytes you upload, download from that image).
    – if you use S3 service to store your data (because if you turn off the image, all the information, all the software you install on it will be lost), you pay more but it costs you very little if you just store a couple of giga bytes). No cost if you download, upload from your image to S3.

    That’s it, no setup fee.
    I used that to deploy a web application on glassfish v2 (and used Oracle 10g XE) to advertise myself (now I have a job and don’t need it any more).

    If anybody wants to test drive it, we can work something out, for example, I can let you use that image any time in at least a week and you can give me about 9cents/hour ($2.16/day or $15.12/week). That 9cents/hour will cover the fee that you donwload, upload from that image. Send me an email (amazonec2 (at) momentumsystem dot com) if you’re interested.

    Thank you.

  4. October 3, 2009 at 10:34 pm

    Jose Fernandez :
    I would be very interested to hear about your experience with EC2 in more detail. That is a *ton* of RAM for the price! How about an update in a week or two?

    Sure jose, feel free to ask me here. I am pleased with performance and uptime. There are advanced topics to take snapshot of your data and stored in S3, to give one of most safest option.

  5. October 3, 2009 at 10:36 pm

    @Kirs

    http://aws.amazon.com/ec2/#pricing This link will answer your question. Basically, you have two options, either pay per use (per hr.) OR pre-pay some amount per yr & pay very less per hr. So you need to estimate, how many hrs you will be running your instance and then calculate which option will be better.

  6. October 3, 2009 at 10:43 pm

    I calculated (with pricing as of 10/03/2009 of EC2), if you planning to use instance for only few hrs a day, then break even number of hrs is 13hrs.

    It means, if you instance runs for average of less than 13hrs a day, then better pay $0.10/hr, but if your instance runs more than 13hrs a day, then it’s cost savings in pre-paying for amazon instance.

    This is based upon smallest size EC2 instance for linux OS.

  7. Amr
    October 4, 2009 at 1:52 pm

    how did you manage to only spend $42 a month ? could this be possible even you are running a small instance ?

  8. Mustaq
    October 4, 2009 at 4:36 pm

    Ash, thanks for the great post about Amazon EC2. It was short but quite informative and the comments have some great insight from readers.

    But quick question for you or anyone, am I correct to assume you use Amazon EC2 as the virtual machine instance then have that connect to Amazon S3 for any type of data storage? Does anyone know of an overview or guide that shows us how the parts all interoperate?

    I’m asking because I’m presently hosting 6 websites (non-profit organizations) on one dedicated server and two of them want to implement some dynamic applications in PHP which will likely burst the Mysql usage and data transfers.

    In summary, I don’t really understand how these systems all tie together from Amazon to know what I need to evaluate.

  9. October 4, 2009 at 8:30 pm

    Amr :
    how did you manage to only spend $42 a month ? could this be possible even you are running a small instance ?

    yes, i am running smallest instance.
    I prepaid $227.50 for a yr and also paying 3cents an hr.
    227.50/12 + 30days*24hrs*0.03cents = $40.55 .. I figured round the figure $42 (you will spend some bucks per month if you use S3 & EBS. )

  10. October 4, 2009 at 8:39 pm

    Mustaq :
    Ash, thanks for the great post about Amazon EC2. It was short but quite informative and the comments have some great insight from readers.
    But quick question for you or anyone, am I correct to assume you use Amazon EC2 as the virtual machine instance then have that connect to Amazon S3 for any type of data storage? Does anyone know of an overview or guide that shows us how the parts all interoperate?

    I’m asking because I’m presently hosting 6 websites (non-profit organizations) on one dedicated server and two of them want to implement some dynamic applications in PHP which will likely burst the Mysql usage and data transfers.
    In summary, I don’t really understand how these systems all tie together from Amazon to know what I need to evaluate.

    One straight answer is, you use ONE ip address per instance of amazon EC2. (unless you run your own DNS server kinda).
    Even with smallest instance, you get 1.7 GB of RAM, so running multiple websites using PHP or even J2EE technologies, it’s more than enough.

    How to run a website?, wait for my next blog in couple of days.

    Amazon EC2 billing is not as straightforward as traditional VPS hosting. Once you start digging around, you will find different fees. (they are in cents, so you always be under $50.. lets assume lots of traffic etc..)

  11. October 16, 2009 at 8:32 am

    Hello from Russia!
    Can I quote a post in your blog with the link to you?

  12. April 6, 2010 at 8:32 am

    nice job. I

  1. October 2, 2009 at 9:19 am
  2. October 2, 2009 at 9:20 am
  3. October 2, 2009 at 9:21 am
  4. October 2, 2009 at 9:23 am
  5. October 2, 2009 at 9:47 am
  6. October 2, 2009 at 10:13 am
  7. October 2, 2009 at 10:14 am
  8. October 2, 2009 at 10:54 am
  9. October 2, 2009 at 10:55 am
  10. October 2, 2009 at 11:14 am
  11. October 2, 2009 at 11:27 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: