首页 > 其他 > 详细

[AWS - DA] EBS

时间:2021-06-05 18:08:46      阅读:46      评论:0      收藏:0      [点我收藏+]

EBS Volume

  • Allow your instance to persist data, even after their termination
  • Can only be mounted to one instance at a time
  • Bound to a specific availability zone (us-esat-1a volume cannot be attached to us-east-1b)
  • It‘s a network drive (not a physical drive)
    • Use for network communicate with instance
    • can be detached from an EC2 instance and attached to another one quickly
  • It‘s locked to an Availability Zone (AZ)
    • To move a volume across, you first need to snapshot it
  • Have to provisioned capcaity (size in GBs, and IOPS)

技术分享图片

 

Delete on Termination attribute

技术分享图片

  • By default, root Volume is deleted
  • Any other attached EBS Volume is not deleted

 

EBS Snapshots

  • For backup fo EBS at a point in time
  • Not necessary to detach volume to do snapshot, but recommeded
  • Can copy snapshots across AZ or Region by taking a snapshots and restore it in another AZ or Region

技术分享图片

 

Copy Volume

  • From the snapshot, you are able to Copy the volume to another Region

技术分享图片

 

 

Create a Volume

  • It contains the same content as the snapshot
  • You are able to change the size (because it is a new volume)
  • You are able to change AZ

技术分享图片

 

AMI Overview

  • AMI = Amazon Machin Image
  • AMI are a customization of an EC2 instance
    • add your own sofrware, config, OS, monitoring...
    • Faster boot / configruiton time becasue all your software is pre-packaged
  • AMI are built for a sepcific region (can be copied across regions)
    • That‘s why in different region, EC2 AMI has different Id
  • You can launch EC2 instances from
    • a pulibc AMI: aws provided (linux 2)
    • Your own AMI: you make and maintain them yourself
    • An AWS marketplace AMI: An AMI someone else made and sells on market

Create AMI Process

  • Start an EC2 instance and customize it
  • Stop the instances (for data integrity)
  • Build an AMI - this will also create EBS snapshots
  • Launch instances from other AMIs

技术分享图片

技术分享图片

 

EC2 Instance Store

  • EBS Volumes are netowrk drive with good but "limited" performance
  • If you need a high-performance hardware disk, use EC2 instance store
  • Better I/O performance
  • EC2 instance store lose their storage if they‘re stopped
  • Good for buffer / cache / scratch data / temporary content
  • Risk of data loss if hardware fails
  • Backups and Replication are your responsbility

 

EBS Volume Types

技术分享图片

SSD for fast; HDD for throughput;

  • EBS Volmes are characterized in Sizse | Throughput | IOPS 
  • Only gp2/gp3 and io1/io2 can be used as boot volumes
  • Only SSD type of EBS volume can be boot volume

 

General Purpose SSD

  • Size: 1 GiB - 16 TiB

技术分享图片

 

Provisioned IOPS SSD

  • Critical busniess application with sustained IOPS perforamnce
  • Or application that need more than 16,000 IOPS
  • Greate for database workloads (sensitive to storage perf and consisitency)

技术分享图片

 

Hard Disk Drives (HDD)

  • Cannot be boot volume
  • 125 MiB to 16 TiB

技术分享图片

 

EBS Multi-Attach - io 1 /io 2 family

  • Attach the same EBS volume to multiple EC2 instances in the same AZ
  • Each instance has full read & write permissions to the volume
  • Use Case: higher application availability in clustered Linux application, application must manage concurrent wrtie operations
  • Must use a file system that‘s cluster-aware (not, XFS, EX4...)

技术分享图片

 

EFS - Elastic File System

  • Performance that scales to support any workload: EFS offers the throughput changing workloads need. It can provide higher throughput in spurts that match sudden file system growth, even for workloads up to 500,000 IOPS or 10 GB per second.
  • Managed NFS (network file system) that can be mounted on many EC2
  • EFS works with EC2 instances in multi-AZ
  • highly available, scalable expensive

技术分享图片

 

  • Use cases: content management, web serving, data sharing, Wordpress
  • Uses NFSv4. I protocol
  • Use secirty group to control access to EFS (SG is a must)
  • Compatible with Linux based AMI (not windows)
  • Encryption at rest using KMS
  • Can scales automatically.

EFS - Performance & Storage Classes

EFS Scales

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

Performacne mode (set at EFS creation time)

  • General purpose(default): latency-sensitive use case (web server, CMS)
  • MAX I/O - higher latency, throughput, highly parallel (big data, media processing...)

Throughput mode

  • Bursting (1TB = 50MiB/s + burst of up to 100MiB/s)
  • Provisioned: set your throughput regardless of storage size

Storage Tiers (lifecycle management feature - move file after N days)

  • Standard: for frequently accessd files
  • Infrequent access(EFS-IA): cost to retrieve files, lower price to store

技术分享图片

技术分享图片

 

技术分享图片

技术分享图片

 


 

 

技术分享图片

EBS is AZ locked, you cannot attach to an EC2 in a different AZ.

Multi-attach EBS can be attached to differnet AZ, but only for io1/io2 family

 

技术分享图片

EFS is regional stroage, can be shared to multi AZ. EC2s can access EFS to get same content.

EFS is only Linux based

 

技术分享图片

Instance store is for caching the data temp... will lose the data once instance is terminated. Performance for I/O is the best amount EFB, EBS

 

技术分享图片

Is running a DB on EC2 instance store possible? It is possible to run a database on EC2. It is also possible to use instance store, but there are some considerations to have. The data will be lost if the instance is stopped, but it can be restarted without problems. One can also set up a replication mechanism on another EC2 instance with instance store to have a standby copy. One can also have back-up mechanisms. It‘s all up to how you want to set up your architecture to validate your requirements. In this case, it‘s around IOPS, and we build an architecture of replication and back up around i

Answer: Use EC2 intance store, for high-performance file storeage on disk. If you handle backup correct, instance store can be a good option.

 


 

 

技术分享图片

The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. So, for a 200 GiB volume size, max IOPS possible is 200*50 = 10000 IOPS. 15000 IOPS > 10000 IOPS, so it is wrong.

io2: ratio is 500:1

General Purpose SSD gp3 is also 500:1

 

[AWS - DA] EBS

原文:https://www.cnblogs.com/Answer1215/p/14853318.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!