对于Amazon EC2上的实例,我不清楚从EBS和实例商店获得了哪些好处。如果有什么区别的话,似乎EBS更有用(停止,启动,坚持+更好的速度),成本差异相对较小…?另外,考虑到EBS仍然相对较新,是否有任何指标可以衡量现在使用EBS的人更多?


当前回答

EBS就像虚拟机的虚拟磁盘:

持久,由EBS支持的实例可以自由启动和停止(节省资金) 可以在任何时间点进行快照,以获得时间点备份吗 可以从EBS快照创建ami,因此EBS卷成为新系统的模板

实例存储为:

本地的,所以通常比较快 非联网,在正常情况下,EBS I/O是以网络带宽为代价的(EBS优化实例除外,它们具有独立的EBS带宽) 每秒I/O IOPS有限。即使配置的I/O最大IOPS也只有几千 脆弱的。一旦实例停止,就会丢失实例存储中的所有内容。

以下是使用它们的地方:

Use EBS for the backing OS partition and permanent storage (DB data, critical logs, application config) Use instance storage for in-process data, noncritical logs, and transient application state. Example: external sort storage, tempfiles, etc. Instance storage can also be used for performance-critical data, when there's replication between instances (NoSQL DBs, distributed queue/message systems, and DBs with replication) Use S3 for data shared between systems: input dataset and processed results, or for static data used by each system when lauched. Use AMIs for prebaked, launchable servers

其他回答

对于一个刚接触这一切的人,如果不小心降落在这里

到目前为止,快速入门部分的所有AMI都是EBS支持的

另外,在官方文档中有一个很好的解释,说明了EBS和实例存储之间的区别

&这张图片几乎总结了它

我们喜欢实例存储。它迫使我们使实例完全可回收,并且我们可以轻松地在给定AMI上从头构建服务器的过程自动化。这也意味着我们可以很容易地交换ami。此外,EBS仍然时不时地存在性能问题。

大多数人选择使用EBS支持的实例,因为它是有状态的。这是更安全的,因为您在其中运行和安装的所有内容都将在停止/停止或任何实例故障中幸存下来。

实例存储是无状态的,在任何实例失败的情况下,您将丢失其中的所有数据。但是,由于实例卷绑定到虚拟机运行的物理服务器上,因此它是免费的,而且速度更快。

Eric pretty much nailed it. We (Bitnami) are a popular provider of free AMIs for popular applications and development frameworks (PHP, Joomla, Drupal, you get the idea). I can tell you that EBS-backed AMIs are significantly more popular than S3-backed. In general I think s3-backed instances are used for distributed, time-limited jobs (for example, large scale processing of data) where if one machine fails, another one is simply spinned up. EBS-backed AMIS tend to be used for 'traditional' server tasks, such as web or database servers that keep state locally and thus require the data to be available in the case of crashing.

我没有提到的一个方面是,您可以在运行时对ebs支持的实例进行快照,这有效地允许您对基础设施进行非常经济的备份(快照是基于块的和增量的)

我在上一份工作中有和埃里克完全一样的经历。现在在我的新工作中,我正在经历我在上一份工作中经历过的同样的过程……为EBS支持的实例重新构建所有AMI——可能是32位机器(更便宜——但不能在32和64机器上使用相同的AMI)。

EBS支持的实例启动足够快,您可以开始使用Amazon AutoScaling API,该API允许您使用CloudWatch指标来触发其他实例的启动,并将它们注册到ELB(弹性负载均衡器),还可以在不再需要时关闭它们。

这种动态自动伸缩就是AWS的意义所在——IT基础设施的真正节省可以发挥作用。用旧的s3“instanceore”支持的实例来实现自动伸缩几乎是不可能的。