Types of EC2 instances
Each Amazon EC2 instance type is grouped under an instance family, and optimized for certain type of tasks. These families are:
- General purpose
- These provide a good balance of compute, memory, and networking resources.
- Often use for diverse workloads like web services or code repositories
- Compute optimized
- These are ideal of compute-intensive tasks, like gaming services, high performance computing (HPC), or scientific modeling
- Memory optimized
- For tasks that require high memory usage
- Accelerated computing
- Good for floating point number calculates
- Graphics processing
- Data pattern matching
- They are equipped with hardware accelerators
- Storage optimized
- High performance for locally stored data
General purpose
Provide balanced compute, memory, and networking resources. Used for:
- Application servers
- Gaming servers
- Backend servers for enterprise
- Small and medium databases
If all the resource requirements are roughly equivalent, a general purpose instance is a good idea because it does not require optimization in any single resource area.
Compute optimized
These are ideal for compute-bound applications that benefit from high-performance processors. They can be used for the same things as general purpose instances; however, because of the high performance CPUs these excel at managing workloads that are compute-heavy, including gaming servers or batch processing loads that require processing many transactions in a single group.
Memory optimized
Memory optimized instances are designed to deliver fast performance on workloads that use large datasets in memory. For example, suppose that you have a workload that requires large amounts of data to be preloaded prior to running an application - such as a high-performance database or real-time processing of large amounts of unstructured data. In these cases, a memory optimized instance would be ideal, as it provides greater performance for memory based workloads.
Accelerated compute
These instances use hardware accelerators, or coprocessors, to perform some functions more efficiently than it would be possible by running on CPUs. This might include floating-point calculations, graphics processing, or data pattern matching.
These also perform well in workloads involving graphics applications, game streaming, and application streaming.
Storage optimized
Storage optimized instances are designed for workloads that require high, sequential read and write access to large datasets on local storage. This might include distributed file systems, data warehousing, and high-frequency online transaction processing.
The advantage of storage optimized instances is that they are able to deliver tens of thousands of low-latency random IOPS (input/output operations per second) to applications.
Input operations include entering data into a database, while output operation is data generated by a server. An example of this output might be the analytics performed on the records in a database.