진취적 삶
섹션7 EC2 인스턴스 스토리지 본문
EBS 불륨
인스턴스가 실행 중인 동안 연결 가능한 네트워크 드라이브
일부 EBS 다중 연결
네트워크 드라이브 ( 물리적 드라이브 아님)
불륨을 미리 정해야 한다
Root 의 경우 인스턴스 종료될때 Delete on termination 자동으로 설정되어 있다
불륨을 추가할때는 Delete on termination 을 체크해주어 사용 가능
EBS 불륨의 AZ을 인스턴스의 AZ와 맞추어야 사용 가능
EBS 스냅샷
EBS 불륨의 특정 시점에 대한 백업
다른 AZ or Regio dp copy 가능
특징
- EBS Snapshot Archive
- move a snapshot to an ‘archive tier’ that is 75 % cheaper
- takes within 24 to 72 hours for restoring the archive
- Recycle Bin for EBS Snapshots
- setup rules to retain deleted snapshots so you can recover them after an accidental deletion
- fast snapshot restore (FSR)
- force full initialization of snapshot to have no latency on the first use
AMI
아마존 머신 이미지
- start an EC2 instance and customize it
- stop the instance
- build an AMI
- launch instances from other AMIs
- AWS 리전에는 고유한 AMI 가 있다.
instances 생성시에는
#!/bin/bash
# Use this for your user data (script from top to bottom)
# install httpd (Linux 2 version)
yum update -y
yum install -y httpd
systemctl start httpd
systemctl enable httpd
aim 생성시에는
#!/bin/bash
echo "<h1>Hello World from $(hostname -f)</h1>" > /var/www/html/index.html
EBS instance store
- EBS volumes are network drives with good but “limited “ performance
- if you need a high-performance hardware disk,use EC2 instnace Store
- ec instance store는 그들이 stop 될 경우 그들의 storage 를 잃는다.
- buffer ,cache , temporary content 에는 좋지만 장기적인 스토리지에는 별로
EBS Volume types
- gp2/ gp3 (SSD) : wide variety of workloads
- io1/ io2 (SSD) : high-performance low-latency or high-throughput workloads
- st 1(HDD) : low cost HDD for frequently accessed workloads throughput-intensive workloads
- sc 1 (HDD) : lowest cost HDD volume designed for less frequently accessed workloads
size , Throughput / I/O Ops per Sec 의로 분류
gp3 에서는 IOPS 와 Throughput 을 독자적으로 설정 가능
gp2 에서는 IOPS 와 Throughput 이 서로 연결되어 있음
32,000 IOPS 이상을 요할때는 io1 또는 io2 불륨의 EC2 Nitro 가 필요하다
EBS 인스턴스 스토어 사용
EBS Multi-Attach - io1/io2 family
- same EBS volume to multiple EC2 instnaces in the same AZ
- Use case:
- achieve higher application availability in clustered
- applications must manage concurrent write operations
- Up to 16 EC2 instances at a time
- 동일한 EBS 불륨을 동일한 AZ에 있는 다수의 EC2 인스턴스에 연결
Amazon EFS - Elastic File system
EFS = Managed NFS ( Network file system) that can be mounted on many EC2
- Highly available, scalable,expensive ,pay per use
- 미리 용량을 확보 안해도 되서 파일 시스템이 자동으로 확장되고 사용량에 따라 요금을 지불한다.
EFS - Storage Classes
- Stroage Tiers (lifecycle management feature - move file after N days)
- standard: for frequently accessed files
- infrequent access(EFS-IA) : cost to retrieve files,lower price to store
- Availability and durability
- standard:Multi-AZ, great for prod
- one zone : one AZ , great for dev, backup enabled by default, compatible with IA
- Over 90% in cost savings
EBS vs EFS
- EBS volumns
- can be attached to only one instance at a time
- are locked at the Availability Zone level
- gp2 :IO increases if the disk size increases
- io 1: can increase IO idependently
- to migrate an EBS volume across AZ
- Take a snapshot
- restore the snapshot to another AZ
- EBS Volumes of instances get terminted by default if the EC2 instance gets terminated
- EFS
- Mounting 100s of instnaces across AZ
- EFS share website files
- EFS has a higher price point than EBS
'AWS SAA' 카테고리의 다른 글
섹션 15 AWS CloudFront (0) | 2023.07.15 |
---|---|
섹션 16 AWS 스토리지 추가기능 (0) | 2023.07.15 |
섹션8 고가용성 및 스케일링성:ELB 및 ASG (0) | 2023.07.15 |
섹션 9 AWS 기초:RDS + Aurora+ ElasticCache (0) | 2023.07.15 |
섹션10 Route 53 (0) | 2023.07.15 |