Elastic Block Store (EBS) provides persistent block storage volumes for usage with Amazon EC2 instances in the AWS Cloud.
TIPs:
EBS就像云中的虚拟硬盘驱动器
Type | Description | Use Cases | API Name | Volume Size | Max. IOPS / Volume |
---|---|---|---|---|---|
General Purpose (GP2 SSD) | General purpose that balances price and performance - can be used as boot volumes | Most work loads | gp2 | 1GB - 16TB | 16000 |
Provisioned IOPS (SSD) | Highest-performance SSD for mission-critical applications, IOPS (I/O Ops Per Sec) - can be used as boot volumes | Databases | io1 | 4GB - 16TB | 64000 |
Throughput Optimised Hard Disk Drive (ST1 HDD) | Low cost HDD for freq. accessed, throughput-intensive workloads | Big Data & Data warehouses | st1 | 500GB - 16TB | 500 |
Cold HDD (SC1 HDD) | Lowest cost HDD for less freq. accessed workloads | File Servers | sc1 | 500GB - 16TB | 250 |
EBS Magnetic Previous generation HDD | Workloads where data is infreq. accessed | Standard | 1GB - 1TB | 40 - 200 |
EBS锁定在AZ中,这意味着如果us-east-1a中的EBS卷无法连接到us-east-1b。要跨卷移动卷,首先需要对其进行快照
GP2-General purpose是用于平衡价格和性能的通用卷,这种类型的卷可以用作引导卷:
以下是GP2/3的一些统计数据
io1适用于需要持续IOPS性能或每卷超过16000 IOPS(gp2限制)的关键业务应用程序,也适用于大型数据库工作负载
io1的统计数据
io2 Block Express volumes
吞吐量是指在给定的时间内,有多少数据可以从一个位置传输到另一个位置。它用于测量硬盘和RAM的性能,以及Internet和网络连接。
sc1的统计数据
gp2:通用卷(便宜)
○ 3 IOPS/GB,最小为100 IOPS,可突发到3000 IOPS,最大为16000 IOPS
io1:配置的IOPS(昂贵)
○ 最低100 IOPS,最高64000 IOPS(Nitro)或32000(其他)
Nitro 系统是 AWS 构建的硬件和软件组件的集合,可实现高性能、高可用性和高安全性。
st1:吞吐量优化的硬盘驱动器
○ 500 MB/s吞吐量
sc1:冷硬盘,很少访问数据
○ 250 MB/s吞吐量
需要确保EC2实例的AZ与EBS卷的AZ相同,否则将导致巨大的延迟时间。
EBS快照以增量方式备份到S3
如果我们终止EC2实例会发生什么?
如何将数据从AZ1迁移到另一个不同的AZ(EC2/EBS)?
对于“虚拟化类型”,有“准虚拟”(PV)和硬件虚拟机(HVM)
某些实例不附带根EBS卷。相反,它们附带了“实例存储”,即短暂存储。实例存储物理连接到计算机(EBS是一个网络驱动器)
使用实例存储有优点和缺点
本地EC2实例存储是连接到EC2所在的物理服务器的物理磁盘
它的IOPS非常高,但无法增加其大小,如果硬件出现故障,数据将丢失
EBS在AZ中自动化复制,因此它已经是冗余存储。但是,如果要进一步提高IOPS或镜像EBS卷,则需要在RAID设置中并行装载卷(RAID是可能的,只要您的操作系统支持它)
常规RAID选项:
RAID 1是将一个卷镜像到另一个卷,这意味着如果一个磁盘出现故障,那么我们的逻辑卷仍在工作(因为存在镜像卷)
用例:
Use cases:
content management,
web serving,
data sharing,
WordPress application
EBS | EFS |
---|---|
can be attached to only one instance at a time | can be mounted to hundreds of instances |
locked at the AZ level | can share website media files |
migrating an EBS volume across AZ means first backing it up and re-create it using snapshot in another AZ | |
EBS backups use IO and you should avoid it while the 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 it) |
Characteristics | S3 | EFS | EBS |
---|---|---|---|
Performance | Supports up to 3500 PUT/LIST/DELETE requests and 5500 GET requests per second Slower than EBS and EFS | Baseline performance: 3GB/s Upto 7K IOPS Faster than S3 but slower than EBS | 250-500 IOPS per volume for HDD and 16-64K per volume for SSD Faster than S3 and EFS |
Storage and file size limit | No limit on storage. The individual object can be up to 5TB. | Max 16TB per volume Max 52TB for individual file | Max storage 16 TB No file size limit. |
Accessibility | Accessible via the internet using APIs. It is accessible from anywhere. | Accessible from any region. It has up to 1000 concurrent EC2 instances. You can share files between different regions on multiple EFS instances. | Accessible via single EC2 instance. Accessible in a particular region. |
Access Control | IAM user-based authentication. Uses user policies and bucket policies. Public access via block public access | IAM user-based authentication. Security groups. | IAM user-based authentication. Security groups. |
Data backup and restoring | Use versioning or cross-region replication | EFS to EFS replication | Automated backups and snapshots |
Cost Pay | per use Free: 5GB 1st 50 TB/month at $0.023/GB Next 450 TB/month at $0.022/GB Over 500 TB/month at $0.021/GB | Pay per use Standard storage: $0.30-$0.39 per GB per month (depends on region) Infrequent storage: $0.025-$0.03 per GB per month Provisioned throughput: $6 per MBps-month | Pay for provisioned capacity Free: 30GB General-purpose: $0.045 per Gb per month Provisioned SSD: $0.125 per GB/month, $0.065 per IOPS/month |
Advantages | Easily scalable and can access multiple instances of EC2. Best used for data archiving | Faster than S3 with high IOPS and low latency Most scalable due to availability of multiple EC2 instances. Auto Scaling potential | Faster than S3 with high IOPS and low latency Cheaper than EFS. |
Usage | Use for static storage like for website, media, and entertainment. Best to use for running analytics over static data pool present in S3 with the provision of running complex queries to draw insights | Best for large quantities of data. Large analytic workloads as in bigData analytics. Most suitable for a content management system. Must be used for lift and shift application support | Database backups and low latency applications Use EBS for high-performance storage service on a single device. Transactional and NoSQL databases |
Use S3 for static purposes.
EFS can be used for an application that is highly scalable and high-performance oriented.
EBS is best suited where a single device requires high performance. The best example of EBS will be transactional databases.
简而言之,Snowball是一种将大量数据移动到AWS云中的设备。它支持:
Snowball Edge:Snowball Edge为设备添加了计算能力,它支持自定义EC2 AMI,因此可以将数据处理和分析移动到尽可能接近创建数据的位置
AWS Snowcone | AWS Snowball Edge Storage Optimized | AWS Snowball Edge Compute Optimized | AWS Snowmobile | |
---|---|---|---|---|
使用情景 | 边缘计算、数据传输、边缘存储 | 数据传输、边缘存储 | 边缘计算、数据传输 | 数据传输 |
可用 HDD 存储 | 8 TB | 80 TB | 42 TB | 100 PB |
可用 SSD 存储 | 14 TB | 1 TB | 7.68 TB | 否 |
可用 vCPU | 4 个 vCPU | 40 个 vCPU | 52 个 vCPU | 不适用 |
可用内存 | 4 GB | 80 GB | 208GB | 不适用 |
GPU | 否 | 否 | nVidia V100(可选) | 否 |
板载计算选项 | AWS IoT Greengrass Amazon EC2 AMI | AWS IoT Greengrass Amazon EC2 AMI | AWS IoT Greengrass Amazon EC2 AMI | 不适用 |
DataSync | 是 | 否 | 否 | 否 |
通过 NFS 传输 | 是 | 是 | 是 | 是 |
通过 S3 API 传输 | 否 | 是 | 是 | 否 |
网络接口 | 2x 1/10 Gbit - RJ45 | 2x 10 Gbit – RJ45 1x 25 Gbit – SFP+ 1x 100 Gbit – QSFP28 | 2x 10 Gbit – RJ45 1x 25 Gbit – SFP+ 1x 100 Gbit – QSFP28 | 6x 40 Gbit |
设备大小 | 9 英寸长,6 英寸宽,3 英寸高(227 mm x 148.6 mm x 82.65 mm) | 28.3 英寸长,10.6 英寸宽,15.5 英寸高(548 mm x 320 mm x 501 mm) | 28.3 英寸长,10.6 英寸宽,15.5 英寸高(548 mm x 320 mm x 501 mm) | 不适用 |
设备重量 | 4.5 lb(2.1 kg) | 49.7 lb(22.3 kg) | 49.7 lb(22.3 kg) | 不适用 |
加密 | 有,256 位 | 有,256 位 | 有,256 位 | 是,256 位 |
便携性 | 依靠电池运行 | 否 | 否 | 否 |
无线 | Wi-Fi | 否 | 否 | 否 |
存储集群 | 否 | 是,5-10 个节点 | 是,5-10 个节点 | 不适用 |
常规作业生命周期 | 离线或在线数据传输:数天-数周 边缘计算:数周-数年 | 离线数据传输:数天-数周 | 边缘计算:数周-数年 | 数据迁移:数月 |
适合混合云存储
基础设施的一部分在云上,另一部分在本地
作为内部部署数据和云数据之间的桥梁,在S3中,典型的使用案例是灾难恢复、备份和恢复以及分层存储
Types of Storage Gateway:
1. File Gateway
2. Volume Gateway
Stored Volumes
Cached Volumes
3. Tape Gateway Virtual Tape Library (VTL)
4. FSx File Gateway
总结一下存储卷和缓存卷之间的区别
存储卷将文件存储在S3上并提供本地缓存的copy,而缓存卷将文件存储在本地并将其作为备份推送到S3
if the question is asking “On-premise data to the cloud”, we want Storage Gateway
类型 | 说明 |
---|---|
文件网关(NFS) | 文件作为对象存储在S3存储桶中,通过NFS装载点进行访问。 |
卷网关(iSCSI) | 通过iSCSI块协议使用虚拟目录。文件作为Amazon EBS快照存储在云中。两种类型:(1)存储卷和(2)缓存卷。 |
类型网关(VTL) | 它提供了一个持久、经济高效的解决方案,用于在AWS云中归档您的数据(与卷网关的机制相同)。 |
Amazon FSx for Windows
EFS是用于Linux系统的共享POSIX系统,不适用于Windows机器
Amazon FSx for Windows是一个完全受管理的Windows文件系统共享驱动器
Amazon FSx for Lustre是一种用于大规模计算的并行分布式文件系统
机器学习、高性能计算(HPC)、视频处理、金融建模、电子设计自动化
与S3的无缝集成:
Storage Type | Note |
---|---|
S3 | Object Storage |
Glacier | Object Archival |
EFS | Network File System for Linux instances |
FSx for Windows | Network File System for Windows |
FSx for Lustre | High-Performance Computing |
EBS volumes | Network storage for one EC2 instance at a time |
Instance Storage | Physical storage for your EC2 instance (high IOPS) |
Storage Gateway | File Gateway; Volume Gateway (cache & stored); Tape Gateway |
Snowball / Snowmobile | move a large amount of data to the cloud, physically |
Database | specific workloads, usually with indexing and querying |