15 Feb, 2009

Notes on Amazon EC2

Posted by

Sandeep Shetty from our Products team introduced me to Scalr – an opensource self-scaling hosting platform based on the Amazon EC2 cloud. I decided to take a quick look under the hood and figure out how Amazon EC2 would function as a hosting platform. Here are my quick notes -


  • EC2 offers the ability to instantly provision Virtual machines using an image (called AMIs) through an API
  • Each instance is like a VPS with a certain amount of RAM, CPU, Disk capacity
  • CPU capacity of an instance is measured in the form of EC2 Compute Units. From their FAQ – each EC2 Compute Unit provides the equivalent CPU capacity of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor


  • There are various types of instances
  • As an eg, an instance with 4 EC2 Compute Units, 7.5 GB RAM and 850 GB storage would cost 40 cents per hour => ~$300 per month
  • Data Transfer costs 10 cents per GB for outbound transfers and between 10-17 cents per GB for inbound. Assuming only outbound data transfer (typical case for a web app) and the lowest rate on EC2 (10 cents per GB) the cost per Mbps per month for EC2 works out to be approximately $32.
  • For any persistent storage over and above that provided in the instance one can use Amazon Elastic Block Storage or Amazon S3.
  • Amazon EBS costs are 10 cents per GB per month 10 cents per million I/O requests


  • Many people tend to wrongly assume that EC2 (which stands for Elastic Compute Cloud) allows you to provision resources in an elastic manner and scale your application ad infinitum without any changes to the application. While in theory you can provision instances dynamically upon need, each EC2 instance acts like an independent machine with an independent OS, memory, CPU etc. It is identical therefore to provisioning multiple hardware boxes and any partitioning / load balancing etc would need to be done by the application developer at best online casino the App layer
  • The elasticity does have considerable advantages in as much as provisioning is fully automated and each instance can be added / removed at a moment”s notice (about 10 minutes to boot up a new instance according to their FAQ) thus taking care of peaks dynamically
  • Additionally no hardware setup is required to add / remove an instance
  • Instances are provisioned through images which take care of complete setup thus relieving any system administration effort in setting up a machine
  • Amazon EC2 provides the ability to place instances in multiple locations. Amazon offers multiple regions (USA / Europe) and various Availability Zones within these regions. Availability Zones are distinct locations that are engineered to be insulated from failures in other Availability Zones and provide inexpensive, low latency network connectivity to other Availability Zones in the same Region. Using instances in separate Availability Zones, one can protect applications from failure of a single location.
  • Setting up an EC2 instance is quite easy. Once you create your AWS account, you can use the online AWS Console or simply download the offline command line tools to start provisioning your instances. Check the AWS Console Video for more details on the AWS Console.


  • I can think of using EC2 instances for DNS infrastructure. Easy to deploy, and can scale dynamically to manage high loads. Additionally DNS servers do not require lots of storage and are innately redundant by virtue of the DNS protocol. Lastly, since EC2 provides multiple regions and zones, the DNS infrastructure can be scaled out resulting in geographical redundancy
  • EC2 is great for prototyping as well as benchmarking
  • One can also use EC2 deploying small web apps reducing time to market and allowing quick setup
  • Many applications have monthly report generation requirements which too can be run of an EC2 instance. EC2 offers SQL Server instances incase you want a commercial database to run reports / crunch data.
  • We have also been thinking of using EC2 for CodeChef. Since at CodeChef we plan on running a programming contest each mont, visitors as well as computing resources required to manage submissions increase considerably around the time each contest is announced. This makes Amazon EC2 a perfect candidate for dynamic resource deployment during contest-week

Other Amazon Web Services

  • Amazon S3 provides a scalable, high-available and redundant NAS that can be used to store and retrieve any amount of data
  • Amazon CloudFront is their CDN layered onm top of S3. It delivers content using a global network of edge locations. Requests for objects are automatically routed to the nearest edge location


Tags: , , , , ,
comment_type == "trackback" || $comment->comment_type == "pingback" || ereg("", $comment->comment_content) || ereg("", $comment->comment_content)) { ?>

Trackbacks & Pingbacks
comment_type == "trackback" || $comment->comment_type == "pingback" || ereg("", $comment->comment_content) || ereg("", $comment->comment_content)) { ?>

Trackbacks & Pingbacks
  • Comment by Mikayel on May 18, 2009 @ 3:08 am
comment_type == "trackback" || $comment->comment_type == "pingback" || ereg("", $comment->comment_content) || ereg("", $comment->comment_content)) { ?>

Trackbacks & Pingbacks
  • Comment by yangyang on March 25, 2010 @ 7:27 am
comment_type == "trackback" || $comment->comment_type == "pingback" || ereg("", $comment->comment_content) || ereg("", $comment->comment_content)) { ?>

Trackbacks & Pingbacks

comment_type != "trackback" && $comment->comment_type != "pingback" && !ereg("", $comment->comment_content) && !ereg("", $comment->comment_content)) { ?>
February 26, 2009

I think if you are thinking of virtualization you should evaluate other (and potentially much better) options than EC2. I read above that you have already realized its limitations. It is a cloud in a nascent stage which does not allow resource monitoring capabilities, or even resource changes while the resources are in use.

Essentially, their underlying virtualization architecture may not have support for features like hotplug (which are used to enhance the memory/cpu/device resources assigned to a particular VM), or ballooning (used to take out memory resources from the VM), which operate at run time without the need of powering down the VM (i.e. providing a fully dynamic resource control on the VM instead of the need to allocate a new resource when the needs increase).

There is a lot more to it. If you are really thinking of a virtualized resource setup for your own business, I would strong suggest comparing different options before you stick on one. Perhaps you may be willing to add virtualization as one of your business portfolios (as a reseller, configur-ator, or just a consultant).

Let me know if you wish to connect to have more discussion on this. My URI will tell you where to reach me.

comment_type != "trackback" && $comment->comment_type != "pingback" && !ereg("", $comment->comment_content) && !ereg("", $comment->comment_content)) { ?>
May 18, 2009

I will add also http://www.monitis.com for monitoring your instances in case you will prefer switching to them

comment_type != "trackback" && $comment->comment_type != "pingback" && !ereg("", $comment->comment_content) && !ereg("", $comment->comment_content)) { ?>
March 25, 2010

Grassroots Indigenous Multimedia announces the launch of their new Ojibwe Language learning software, Ojibwemodaa.Best Way : Rosetta stone learning Tips. Available in more than 30 languages, the Rosetta stone language-learning solution is used by schools, the consumer will write a message on the Personal Rosetta Stone. Download free language software, play online games and start learning a language now.

comment_type != "trackback" && $comment->comment_type != "pingback" && !ereg("", $comment->comment_content) && !ereg("", $comment->comment_content)) { ?>
April 13, 2010

Nike air max a light and resilient patented material. Liz Dolan, Nike Cortez a former marketing chief at Nike, says in the film that the origins of “Just Do It” were not widely known or acknowledged. More information in the shop airmax-online.com

Leave a comment



Spam protection by WP Captcha-Free