[AWS] 3. EC2 Storage

Nina·2021년 2월 19일
0

AWS

목록 보기
3/7
post-thumbnail

Stephane Maarek의 「Ultimate AWS Certified Developer Associate 2021 - NEW!」 강의 내용 정리

1. EBS

An EC2 machine loses its root volume(main drive) when it is manually terminated
Unexpected terminations might happen
Sometimes you need a way to store your instance data somewhere
An EBS(Elastic Block Store) volume is a network drive you can attach to your instances while they run
It allows your instances to persist data

EBS Volume

  • it’s a network drive(not a physical drive)
  • ➜ it uses the network to communicate the instance, which means there might be a bit of latency
    ➜ it can be detached from an EC2 instance an attached to another one quickly
  • it’s locked to an AZ -> to move a volume across, you first need to snapshot it
  • have a provisioned capacity

2. EBS Volume Types

gp2: general purpose volumes(cheap)

  • recommended for most workloads
  • system boot volumes
  • virtual desktops
  • low-latency interactive apps
  • development and test environments

io1: provisioned IOPS(expensive)

  • critical business applications that require sustained IOPS performance, or more than 16000 IOPS per volume (gp2 limit)
  • large database workloads(zb. MySQL, Postgre SQL, Cassandra, Oracle..)

st1: throughput optimized HDD

  • streaming workloads requiring constant, fast throughput at a low price
  • big data, data warehouses, log processing
  • cannot be a boot volume

sc2: cold HDD, infrequently accessed data

  • throughput-oriented storage for large volumes of data that is infrequently accessed
  • scenarios where the lowest storage cost is important
  • cannot be a boot volume

3. EBS vs Instance Store

Some instance do not come with Root EBS volumes. Instead, they come with ‘instance store)
Instance store Is physically attached to the machine

Local EC2 Instance Store

physical disk attached to the physical server where your EC2 is ➜ very high IOPS!

4. EFS(Elastic File System)

Managed NFS(network file system) that can be mounted on many EC2
EFS works with EC2 instances in multi AZ
Highly available, scalable, expensive, pay per use
Uses security group to control access to EFS
Compatible with Linux based AMI(not windows)

EFS scale

  • 1000s of concurrent NFS clients, 10GB+ /s throughput
  • grow to petabyte-scale network file system, automatically

Performance mode

  • general purpose: latency-sensitive cases
  • Max I/O - higher latency, throughput, highly parallel

Storage Tiers

  • standard: for frequently accessed files
  • infrequent access: cost to retrieve files, lower price to store

5. EFS vs EBS

EBS

EBS volumes

  • can be attached to only one instance at a time
  • are locked at the AZ level
  • gp2: IO increases if the disk size increases
  • io1: can increase IO independently
To migrate an EBS volume across AZ
  • take a snapshot
  • restore the snapshot to another AZ
  • EBS backups use IO and you shouldn’t run them while your application is handling a lot of traffic
Root EBS volumes of instances get terminated by default if the EC2 instance gets terminated(you can disable that)

EFS

Mounting 100s of instances across AZ
EFS share website files(WordPress)
Only for LINux instances
EFS has a higher price point than EBS -> can leverage EFS-IA for cost savings

profile
https://dev.to/ninahwang

0개의 댓글