This AWS Service provides Virtual Machines (or dedicated physical servers) available in a variety of pricing models. The main selling point behind EC2 is the removal of a need for traffic forecasting by the implementation of auto-scaling. Auto scaling refers to the ability to scale compute resources up or down based traffic.
Horizontal scaling, as opposed to vertical scaling, refers to the ability to increase the number of instances handling incoming traffic. Vertical scaling, on the other hand, refers to the increase of disk space or memory for a single instance.
EC2 offers both methods of auto-scaling, but only horizontal scaling can offer un-interrupted service.
For all pricing models, charges are based on usage. If an instance is terminated by AWS, no charge is applied, but if it is terminated manually, this is considered part of usage and results in a charge.
The instance type chosen during launch determines the hardware used for your instance. Each instance type gives you distinct benefits with hardware optimized for specific purposes including:
Multiple instances exist on a shared host computer. Resources from the host computer are allocated based on instance type. For instance, for an instance with high I/O, more the shared resources will be allocated to that instance.
Storage volumes in an EC2 instance are done via “elastic block stores.” These "blocks" are like hard-drives which may be mounted onto any running instance within the same Availability Zone as an instance volume. To move a volume into a different AZ, you must create a snapshot and then restore it as a new volume in that AZ.
These EBS Volumes may be attached to an EC2 instance but they exist independently of the instance. This means they will persist beyond the life-cycle of an instance.
Configuration of a volume mounted to an instance may be changed dynamically.
What follows are direct qutotations from the documentation, summarizing the distinctions of each:
Solid State Drive (SSD)
General Purpose SSD volumes offer a base performance of 3 IOPS/GiB, with the ability to burst to 3,000 IOPS for extended periods of time. These volumes are ideal for a broad range of use cases such as boot volumes, small and medium-size databases, and development and test environments.
- IOPS calculated based on volume size.
Provisioned IOPS SSD volumes support up to 64,000 IOPS and 1,000 MiB/s of throughput. This allows you to predictably scale to tens of thousands of IOPS per EC2 instance.
- IOPS configurable; guaranteed 99.99% of the time
Hard Disk Drive (HDD)
Throughput Optimized HDD volumes provide low-cost magnetic storage that defines performance in terms of throughput rather than IOPS. These volumes are ideal for large, sequential workloads such as Amazon EMR, ETL, data warehouses, and log processing.
Cold HDD volumes provide low-cost magnetic storage that defines performance in terms of throughput rather than IOPS. These volumes are ideal for large, sequential, cold-data workloads. If you require infrequent access to your data and are looking to save costs, these volumes provides inexpensive block storage.
Instance Store Volumes
You can create an EFS file system and configure your instances to mount the file system. You can use an EFS file system as a common data source for workloads and applications running on multiple instances.
How to distribute your instances per use case.