Choosing The Right Type Of EC2 Instance

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is intended to make web-scale cloud computing easier for developers. Amazon EC2’s simple web service interface allows users to obtain and configure computing capacity with minimal friction. EC2 is one of the oldest offering of AWS and it is widely used by many businesses across the world. Since its inception, EC2 has undergone many enhancements. It might get confusing to figure out the right type of EC2 instance to choose for your applications.

AWS has kept pace with the ongoing improvements in server processor technology. New instance type offerings are regularly introduced to deliver the improved performance capabilities to cloud customers. Cloud computing has reduced the lean time to market for such hardware improvements, dramatically, as a result.

In this post, we will explore major Instance types available and how you can choose the right type of instance for your Workload.

Basics of EC2

Before we begin, it is important to understand how to decode the AWS Instance naming convention. For example, let us look at Instance type – M5 Large.

M represents the Instance type signifying General Purpose which means it is a balanced combination of vCPU and RAM for most simple workloads.

5 represents Fifth Generation of Instance Type (in this case, it is Intel Skylake Chip).

Large represents the amount of vCPU and RAM for the instances type (as in size).

Another important point to note is that from M5 or any other fifth generation Instance class (R5 & C5), AWS comes with its own Virtualization layer called Nitro system. This is a new enhancement than the previous generations which were using Xen Hypervisor.

EC2 Instance Types

Amazon EC2 provides a broad array of instance types designed to address different use cases. Instance types offer a mix of CPU, memory, storage, and networking capacity and provide you with the flexibility to choose the right mix combination of resources for your applications. Each instance type comprises of one or more instance sizes, which allows you to scale your resources according to the requirements of your target workload.

General Purpose

General purpose instances provide a combination of compute, memory and networking resources, and are suitable for a variety of diverse workloads. Such instances are perfect for applications that use these resources in equal proportions such as web servers and code repositories.

Compute Optimized

Such instances are ideal for compute bound applications that benefit from high performance processors. They are optimized for compute-intensive workloads and deliver cost-effective high performance at a low price per compute ratio.

Memory Optimized

If your application processes large datasets in memory, then memory optimized instances would be your choice. They are well suited for memory intensive applications such as high performance databases, big data analytics and enterprise applications.

Storage Optimized

Such instances are designed for workloads that require high, sequential read and write access to very large data sets on local storage.

You can know more about AWS EC2 Instance types in this article.

Factors to consider before choosing EC2 Instance

Availability

The first and foremost factor to consider is that not every type of AWS Instance is available in every region. It is possible that the type of Instance you are looking for has not been released in your desired AWS region. In such cases, you will either need to choose an available previous-generation Instance of that type or change the Instance type. In most cases, widely used Instance types are available in all regions, but it might be prudent to ensure that your desired instance is available in your region.

Cost

Another Important point is that the EC2 charges might differ according to your region as it depends on factors such as Manpower, Electricity, Taxes etc. in that region. You might want to check the latest documentation for AWS EC2 charges in your desired region.

Payment models

AWS offers many payment models for EC2, depending on the product. You can choose the type of EC2 instance that best suits your needs.

On Demand: this is the easiest and most straightforward model in which you pay for what you use. This type of billing provides most flexibility as there is no commitment and you can spin up new instances, use and terminate, as required.

Reserved Instances: This is a more traditional payment model where you enter into a long term commitment with AWS. AWS provides significant discounts, up to 75%, by paying for capacity ahead of time. This model is beneficial in cases where you have steady workloads.

Spot Instances: Under this pricing mechanism, AWS lets you purchase spare computing capacity with no upfront commitment at discounted hourly rates.

Dedicated Host: This refers to a physical EC2 server dedicated for your use. This can help you reduce your costs by allowing you to use your existing server-bound software licenses, including Windows Server, SQL Server, and SUSE Linux Enterprise Server (subject to license terms). An added advantage is this can help you meet compliance requirements.

AWS offers ‘per-second-billing’ for most of the Linux Instances across On-Demand, Reserved, and Spot Instances and ‘per-hour-billing’ for other license-based OS. Per-second billing is particularly effective for resources that have periods of low and high usage such as development and testing, data processing, analytics, batch processing, and gaming applications.

The right type of Instance depends on the operation of your particular application. Identify whether your application is CPU-intensive, RAM-intensive or network-heavy and choose the instance type that best addresses your requirement.

Tags: Cloud Migration Digital Transformation Public Cloud