Navigating AWS EC2 Launch Types

Transitioning your company from traditional, on-prem architecture to a cloud native architecture can be a technically consuming project. Along with the technical shift in the way you think about your architecture, you also have to reposition your thinking around pricing and provisioning. Leveraging infrastructure as a service (IaaS) means you no longer need to buy a physical box and wait for it to be installed. You are now able to provision a new instance (sever) as easily as renting a movie from Apple TV or signing up for a Spotify subscription.

If you are familiar with Amazon Web Services (AWS) then you will know there is a host of launch types to choose from when provisioning a new EC2 instance:

  • on-demand

  • reserved

  • scheduled reserved

  • spot instances

  • dedicated instances

  • dedicated hosts

But which one is right for your company? The answer to this question is: it depends! This is, admittedly, not a very helpful answer. It unfortunately is the correct answer. The proper launch type will vary depending on workload, SLA’s, usage patterns, and budget.

Let’s breakdown each of the launch types so you can be better prepared when provisioning new instances on AWS.

On-Demand

This is the launch type that is probably most familiar to you. As the name suggests, on-demand means you request a new instance and it is immediately available for use. Billing is calculated by the second or the hour while the instance is running. There is no upfront cost or long-term commitment. On-demand instances are good for short workloads and when you want predictable pricing.

For example, let’s say a new version of your business intelligence server becomes available and you need a sandbox environment to play with the new features and test existing content. However, you only need the environment for a few weeks and only plan on testing for a few hours a day. You could provision an on-demand EC2 instance and install the new version of the server on it. While you are testing, you can have the instance running. Once the testing is finished for the day, you can stop the instance until it’s needed again. This will allow you to conduct your testing while spending the minimum amount needed for server time used. You won’t have to worry about paying for unused hours while you are not testing. You can then terminate the instance when the testing is complete, and it is no longer needed.

Reserved Instances

Reserved instances allow you to reserve instances for a set period of time. These instances can be reserved between 1 and 3 years. Reserving instances allows you to receive discounts up to 70% of on-demand pricing. This launch type is targeted at traditional IT use cases.

A good use for this launch type would be a database server. You need this instance to always be available and know you will need it for at least 1 year. Using a reserved instance will allow you to minimize your costs by receiving a significant discount over an on-demand instance.

Convertible Reserved Instance

This is similar to a reserved instance, except that you can alter the EC2 instance type. The discount is smaller, up to 54% of on-demand pricing, but you gain more flexibility if your computing needs change.

For example, you may start with an m5a.large instance type. This would be 2 vCPU’s and 8 GB of memory. Then, as the workload increases, you can change the instance type to an m5a.4xlarge. The instance would now have 16 vCPU’s and 64 GB of memory.

Scheduled Reserved

This is similar to reserved instances in that you reserve them between 1 to 3 years. However, with scheduled reserved instances you also must define the time of day, week, or month you want the instance to be available. If you need the instance to only be available between 1:00 PM and 4:00 PM on Tuesdays, then that is the only time the instance will be available to you.

Let’s say you have a resource-intensive batch job that you would like a dedicated app server to run so it doesn’t disrupt other activities in your application. It’s a critical job that you need to run for at least another year. However, the job only runs for an hour a day. Using a scheduled reserved instance would allow you cost-efficiently to offload this work to an additional app server.

Spot Instances

Spot instances are unused EC2 capacity that you bid on when they become available. They are the cheapest of the available launch types. You can get up to a 90% discount compared to on-demand pricing. This price does come with significant caveats. Primarily, you can lose your instances should you be outbid. Let’s take a look at how this works.

You bid on spot instances by setting a maximum spot price. This is the most you are willing to pay for a spot instance. If the current spot price is at or below your max spot price, you will be provisioned the instances you have requested. If the current spot price exceeds your max spot price, you will lose your instances.

Losing instances may sound horrifying, but there are a number of use cases that are ideal for spot instances. Anything that is highly resilient or able to be retried if they fail, such as batch jobs or image processing, can leverage spot instances. You could also use a blend of reserved instances with spot instances. For example, you know your steady, baseline usage of an application requires three EC2 instances. Unfortunately, there are random spikes in usage throughout the year that cause these instances to be overwhelmed with requests. Using spot instances can help distribute the excess workload during these periods and maintain your application’s stability and availability while minimizing your cost.

Dedicated Hosts

Dedicated hosts allow you to book an entire physical server and control the placement of the instance. You will gain full visibility into the underlying sockets and cores. This is ideal for server-bound licensing agreements that allocate licenses per core or for meeting certain compliance needs. Dedicated hosts can be purchased on-demand or reserved. Reserved pricing allows for up to a 70% discount compared to on-demand and is reserved for either 1 or 3 year periods.

Dedicated Instances

Dedicated instances ensure that no other AWS customer shares the same hardware as you. This type differs from dedicated hosts in that you do not have a say in where the instance is placed and do not have insight into the underlying sockets and cores.

Wrap-Up

If you’re still unsure about which launch type is right for you, a good analogy to use is to think about them like hotels.

  • Showing up to a hotel and asking to be placed into a room immediately would be like using an on-demand launch type.

  • Calling the hotel in advance and reserving a room for 3 nights would be like using a reserved instance.

  • Using a site that sells unused hotel rooms at a discount would be like using spot instances.

  • Renting out an entire wing of a hotel for a wedding party would be similar to a dedicated instance.

  • Buying the hotel for your own private use would be comparable to a dedicated host.

Remember, one size does not fit all. You will most likely use a combination of launch types to meet all your organization’s needs. So, evaluate your workload, availability expectations, usage patterns, and budget to help determine which launch type.

Next Steps

We hope you found this article informative. Be sure to subscribe to our newsletter for data and analytics news, updates, and insights delivered directly to your inbox.

If you have any questions or would like PMsquare to provide guidance and support for your analytics solution, contact us today.