Choosing the right Amazon EC2 instance type

Cloud expenses can spiral out of control if you make the wrong move. To get the best deal on your cloud use, choose the right Amazon EC2 instance.

With all the recent announcements from Amazon, Google and Microsoft on cloud price reductions, it’s important to

understand your public cloud payment options. Amazon EC2 offers a number of different methods for purchasing computing resources, each of which is based on buying a virtual machine instance for some period of time. A key factor in controlling cloud computing costs is to choose the right type of Amazon EC2 instance -- on-demand, reserved or spot instances --- to meet your needs.

Amazon EC2 on-demand and reserved instances are fairly straightforward. You can start an on-demand instance at any time and pay a fixed hourly price, which varies by instance size but generally ranges from $0.02 per hour for a micro-instance running Linux to $2.28 per hour for a quadruple, extra-large, high-memory instance running Windows. Installing an on-demand instance means you make no commitment to how long you will use it; you can shut it down at any time and pay only for the time used.

Reserved instances allow cloud managers to purchase at a lower hourly rate by paying an upfront fee. For example, a one-year purchase of a medium-use reserved large instance running Linux costs $640 upfront and $0.096 per hour; the same size instance in an on-demand scale costs $0.32 per hour. Reserved instances can be purchased for one- or three-year periods. On-demand and reserved instances both have fixed prices and offer consistent access to instances when needed.
 

If you’re willing to wait for periods of low demand in the Amazon cloud, and you can accommodate unwanted shutdowns, you can have access to instances at fraction of on-demand costs.

Spot instances were created to address a usage problem with the Amazon cloud. For example, there are times when Amazon EC2 servers have excess capacity. Because Amazon only generates revenue from its EC2 servers when they’re in use, the company wants to entice customers to run more jobs during times of underutilization.

Spot instances are available in the same configurations as on-demand instances, but with two major differences. First, the price of spot instances varies over time. A large instance running Linux might cost $0.10 now, for example, but the cost could be higher or lower an hour from now. Amazon sets these spot prices and will change them according to instance demands. The price of a spot instance can conceivably range from nearly zero to that of the on-demand price.

Customers make offers to buy spot instances by setting the price they are willing to pay for an hour. If the customer’s bid price is at or above the spot instance price, they get an instance. If, for example, a customer bids $0.15 for an hour on a large instance and the spot price is $0.11, then the customer will get an instance and is charged $0.11 per hour. If the spot price were $0.16 per hour, the customer won’t obtain access to an instance because the bid is below the spot price.  

The second way in which spot instances differ from on-demand and reserved instances is that Amazon can shut them down at any time. This happens when a spot instance price rises above a customer’s bid.

As an Amazon EC2 customer, you might start a spot instance during a period of low demand in the Amazon cloud with a spot price that’s lower than your bid price. The spot instance might run for hours, or even days, before the spot price rises above your bid price. When that happens, Amazon will shut down your spot instance. This sounds fairly dramatic at first, but most non-mission-critical applications can accommodate an unwanted shutdown without issue.

Spot instances are especially suited for jobs that do not have to run on a fixed schedule. Ad hoc jobs -- converting documents or analyzing a large data set -- are good candidates for spot instances. If you’re willing to wait for periods of low demand in the Amazon cloud, and you can accommodate unwanted shutdowns, you can have access to instances at fraction of on-demand costs.

 

Dan Sullivan, M.Sc., is an author, systems architect and consultant with over 20 years of IT experience with engagements in advanced analytics, systems architecture, database design, enterprise security and business intelligence. He has worked in a broad range of industries, including financial services, manufacturing, pharmaceuticals, software development, government, retail and education, among others. Dan has written extensively about topics ranging from data warehousing, cloud computing and advanced analytics to security management, collaboration, and text mining.

This was first published in March 2012

Dig deeper on AWS instances strategy and setup

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchCloudApplications

SearchSOA

TheServerSide

SearchSoftwareQuality

SearchCloudComputing

Close