Ec2 Instance Families

Page content

What is EC2?

EC2 Instance Types

Amazon EC2 is a cloud compute service provided by Amazon Web Services (AWS). EC2 means Elastic Compute Cloud.

EC2 instances have grown highly popular due to several reasons. They are easily scalable, easy to set up, and you have complete control over these instances and how you use them. AWS uses the virtualization technology to run EC2 instances on physical hosting machines.

It means that when you spin up an Amazon EC2 instance, you are not taking an entire host. Your instance shares the host with multiple other instances or virtual machines. While these instances may share the same host, they are secure and separate. How AWS does this is known as multitenancy.

One host, multiple instances, but each one secure and separate from the other and each one unaware of another’s presence on the host - this is how it works. So, if you plan to host your web application on EC2, you do not have to be concerned about other virtual machines on the physical host eating up resources.

You need not be concerned about how resources are shared between various instances on the same host because there is a hypervisor to take care of it. The hypervisor running on the host machine is responsible for sharing hardware among the instances and the idea of sharing underlying hardware among the virtual machines is known as multitenancy. It is also the AWS managed hypervisor’s job to keep the virtual machines sharing resources on a host machine separate from each other.

Benefits of EC2

EC2 instances are vertically scalable which means you can easily allocate more memory and CPU to your instance. They are easy to set up and you get to decide what OS, and software or configurations you will use on your instance.

Depending on the diverse types of applications, there can be thousands of different configurations. You have complete control over what happens on the EC2 instance you provisioned. Whether you use it to host internal business apps, simple or complex web apps, databases or third party software, is all up to you.

EC2 instances are cost effective. In case of several other compute cloud providers, you will be charged for even a stopped instance. To avoid being charged, you need to delete that instance. However, with Amazon EC2, you are not going to be charged for a stopped instance but only the running instances.

The EC2 instances can also be easily resized. Suppose, you started with a small instance and later realized that your server resources are not sufficient for the growing needs of your application. So, you just allocate more memory and more CPU. This is called vertically scaling an instance meaning whenever you need you can resize an instance and make it bigger or smaller.

You also have higher control on your instances in terms of networking. It means whether these servers are accessible publicly or privately and the type of traffic that is allowed to reach your servers is all up to you. It will happen just as you want.

Virtual machines are not something new, but the ease with which you can provision EC2 servers is what makes it easier for businesses to spin up virtual machines and innovate faster. AWS has just made it a lot easier for businesses and programmers to acquire servers according to their needs through this Compute as a Service model.

These instances are suited for a wide variety of applications from gaming to databases and simple web hosting. Amazon offers different types of instances that suit different needs. So, whether you are planning to launch a website, a small blog, or just need resources for your gaming business, EC2 offers instances in various categories and sizes to suit your needs.

In this post, we will discuss the various EC2 instance types offered by AWS.

AWS EC2 Instance Families

AWS EC2 Instance types are mainly grouped into five EC2 instance families. Each of the families offers different combinations of resources and is optimized for diverse types of tasks.

Each EC2 instance type that AWS offers is grouped under an instance family. These instance families offer different combinations of CPU, memory, storage and networking capacity. This allows you the flexibility to choose an instance based on your exact needs.

Here are the five basic EC2 instance families:

General Purpose EC2 Instances

The general purpose instances offer a good balance of resources. It means if you need a good balance between memory, compute, networking and storage, you must use a general purpose EC2 instance. Such instances are highly suitable for web application servers, backend servers for enterprise applications, small and medium databases as well as gaming servers.

Suppose, you need an instance to run an application that does not need any special optimization in any specific area like compute, memory or networking, then the General Purpose instances are most suited to your needs. In case of running an application where compute, memory and networking have equal priority, it is best to use a general purpose instance.

Memory optimized EC2 Instances

Workloads that need to process vast datasets in memory would perform best on memory optimized instances. Memory is used for temporary storage in computing and it holds all the data and resources that the CPU needs for completing actions.

A computer program or application will be loaded from storage to memory to be able to run. This is called preloading and allows the CPU direct access to the application.

Suppose your workload needs to preload vast amounts of data before it can run an application, such as a high performance database or another workload that processes vast amounts of unstructured data in real time. When dealing with such workloads, memory optimized instances are the most suitable. Workloads that have high memory needs will deliver great performance when running on a memory optimized EC2 instance.

Compute Optimized EC2 Instances

Compute optimized instances are best for applications needing high performance processors.

The compute-bound applications depend highly on processors. Compute optimized instances can be used for web, application and gaming servers. However, they are different from the general purpose instances in that they are good for workloads requiring high performance web servers, compute intensive application servers, and dedicated gaming servers.

Compute optimized instances can be also used for batch processing workloads that need to process many transactions in a single group. Batch processing is the method that computers use to complete periodically high volume, repetitive data jobs. Some data processing tasks like backup, sorting and filtering can be highly compute intensive.

Accelerated Computing EC2 Instances

The accelerated computing instances use hardware accelerators or coprocessors, which can expedite data processing. These instances can perform certain tasks with higher efficiency compared to software running on CPUs.

For example, these instances can perform tasks like floating-point number calculations, graphics processing, and data pattern matching with higher efficiency.

These instances are most suited for workloads such as graphics applications, game streaming, and application streaming.

Storage Optimized EC2 Instances

When you are dealing with workloads requiring high, sequential, read and write access to large datasets on local storage, storage optimized Instances are your best option. Workloads such as distributed file systems, data warehousing applications, and high-frequency online transaction processing (OLTP) systems etc require storage optimized instances for best performance.

There is a metric in computing called input/output operations per second (IOPS) that measures the performance of a storage device. It indicates the number of input or output operations a storage device can perform per second.

Storage optimized EC2 instances can deliver tens of thousands of low-latency, random IOPS to applications.

When you enter data into a system like data entry into a database, it is called an input operation and the data generated by a server such as analytics performed on the records in a database is an example of an output operation.

If you have an application with a high IOPS requirement, you must use a storage optimized instance which can provide a lot better performance in this scenario compared to the other instance types.

Conclusion

So, these were the five major instance families offered by Amazon EC2. EC2 is fast and secure as well as autoscaling and can be deployed in minutes. Whether you need a single instance or a thousand, provisioning these instances is very easy.

Based on your application type, you can select the right instance type easily. We have provided examples to help you decide which instance family is the best for your needs. For basic usage like a web server for a small website, blog or even for gaming, a general purpose instance can be great. However, depending on the specific type of the application, you might need a different instance type. If your application needs to process vast amounts of data, memory optimized instances would be the best for it.

We will discuss more about EC2 instances, their pricing and features in upcoming posts.