Wednesday, 9 January 2019

Elastic Block Storage: Types and Snapshots in AWS

Elastic Block Storage is one of the important features of AWS. You can consider Elastic Block Storage as Hard Disk of your laptop. Below are some basic points to remember about Elastic Block Storage:

1. Elastic Block Storage (is just like Hard Disk of your laptop) and can only be used by mounting on an EC2 instance unlike S3.

2. EBS is persistent storage system. Instance storage is non-persistent.

3. EBS provide 1G to 1TB data storage capacity. If you want more storage, attach multiple EBS volumes to your EC2 instance.

4. Relationship between EBS and EC2: Multiple EBS can be attached to an EC2 instance but one EBS cannot be attached to multiple EC2 instances simultaneously. On the other hand, one EFS can be attached to multiple EC2 instances. 

5. Root EBS: Root EBS can be only one. Root EBS can’t be encrypted and “Delete on Termination” is checked by default.

6. Available only in single AZ: Multiple Availability Zone is NOT supported. EC2 and EBS should be in same AZ.

7. Backup to S3: Backup of EBS volumes is called Snapshot and is done in incremental fashion. You can also take point-in-time snapshots of your EBS volumes. Snapshots are stored in S3. 

8. As EBS is only AZ specific, so if you want to make it available in multiple zones, take a snapshot of it, save it to S3 and re-create EBS volume from this snapshot in another AZ.

9. Snapshot Sharing: Snapshots can also be shared to multiple regions and across multiple AWS accounts by backing them up to S3. To share snapshots between AWS accounts, make sure snapshots MUST NOT be encrypted.

10. You can also increase the size of EBS volume while restoring it from snapshot.

11. To take backup of Root EBS (where OS is running), you must stop it first for data integrity. For other EBS volumes you should also stop the instance otherwise it may impact the performance and data integrity.

12. RAID0, RAID1 and RAID10 (combination of both) are preferred. RAID5 is discouraged.

13. EBS is automatically replicated within the same AZ.

14. EBS Volume Types

  • General Purpose (SSD) (gp2) volumes can burst to 3000 IOPS, and deliver a consistent baseline of 3 IOPS/GiB. 
  • Provisioned IOPs (SSD) (io1) volumes can deliver up to 64000 IOPS, and are best for EBS-optimized instances. 
  • Max Throughput Optimized HDD (ST1) – For frequent accessed data
  • Max Cold HDD (SC1) – For IA (in-frequent accessed data)
  • Magnetic volumes, previously called standard volumes, deliver 100 IOPS on average, and can burst to hundreds of IOPS. Lowest cost.

For detailed comparison of above mentioned EBS Volume Types, you can go through the official documentation.

No comments:

Post a Comment