Enhance your career prospects with our Data Science TrainingKNOW MORE
Amazon EBS facilitates the storage of data with the help of block level storage. Block level storage is just like a hard drive, but the only change is that it is present in the cloud. It is used in conjunction with Amazon EC2 instances. These block level storages can be mounted as devices on EC2 instances. These storages can be stacked on top of each other (like EBS volumes) and a file system can be created on top. This setup can be used to manage and run a database, server or utilize it for different requirements like a block device/hard drive.
Different types of data objects can be stored inside an EBS. In fact, an operating system itself can be installed within EBS.
EC2 instance can be run by using it with local storage, but terminating the instance will result in data loss. This is the reason EC2 is used with EBS. This way, even if the EC2 instance is terminated, data is preserved in EBS.
The EBS is housed in an ‘availability zone’, from where requests are served. Data in such a zone can be attached to an EC2 instance and used. In this zone, data is automatically replicated, which helps in securing the data in case of failures. In case the entire zone goes down, the data will be lost since data is replicated in that zone only.
If you wish to make storage volume available in a different ‘availability zone’, just create a snapshot of the volume and restore it in the ‘availability zone’ where you need it.
If you have an Amazon EC2 instance up and running, follow the below steps. Otherwise, create an EC2 instance and then follow the below steps.
There are 4 different types of EBS volumes. They have been classified based on 2 categories. SSD (Solid State Drives) backed up volumes and HDD (Hard Disk Drives) backed volumes. The features of every volume have been listed below. Based on the requirement, one of them can be used, which best suits your use case.
General Purpose SSD (gp2)
It is a solid state device which balances two characteristics- price and performance for many workloads. Its API name is gp2 and its volume size ranges from 1 GiB to 16 TiB. This is the volume which EC2 instance chooses by default. If this is used as a root volume, it improves the performance of the server. The performance is measured with the help of IOPS, i.e Input Output Operations per second. For gp2, it is 16000 (16 KiB I/O). Its max IOPS per instance is 80000. Its maximum throughput per instance is 1750 MiB/s.
It is recommended for most of the workloads.
Provisioned IOPS SSD (io1)
These are the quickest and most expensive EBS volumes. They are used with applications that are I/O intensive, such as relational databases and NoSQL databases. Its API name is io1 and its volume size ranges from 4 GiB to 16 TiB. For io1, IOPS it is 64000 (16 KiB I/O). Its max IOPS per instance is 80000. Its maximum throughput per instance is 1750 MiB/s.
Throughput optimized HDD (st1)
It is a low-cost magnetic storage volume, whose performance is measured in the form of ‘throughput’. They work well with large, sequential workloads (Big Data, Data Warehousing, Log Processing). They are usually used in conjunction with Hadoop clusters. It can’t be used as root volume for EC2 instance. Its API name is st1 and its volume size ranges from 500 GiB to 16 TiB. For st1, IOPS is 500 (1 MiB I/O). Its max IOPS per instance is 80000. Its maximum throughput per instance is 1750 MiB/s.
Cold HDD (sc1)
These are less expensive in comparison to st1. They are designed to work with large, sequential, and cold workloads, behaving like a file server. They work well with less frequently accessed workloads, and can’t be used as root volumes with EC2 instance. Its API name is sc1 and its volume size ranges from 500 GiB to 16 TiB. For gp2, IOPS is 250 (1 MiB I/O). Its max IOPS per instance is 80000. Its maximum throughput per instance is 1750 MiB/s.
In this post, we saw the significance of Amazon EBS and how it can be used in conjunction with Amazon EC2 instance to process data.