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


当前回答

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

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

其他回答

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

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

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

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

底线是您应该几乎总是使用EBS支持的实例。

这是为什么

EBS backed instances can be set so that they cannot be (accidentally) terminated through the API. EBS backed instances can be stopped when you're not using them and resumed when you need them again (like pausing a Virtual PC), at least with my usage patterns saving much more money than I spend on a few dozen GB of EBS storage. EBS backed instances don't lose their instance storage when they crash (not a requirement for all users, but makes recovery much faster) You can dynamically resize EBS instance storage. You can transfer the EBS instance storage to a brand new instance (useful if the hardware at Amazon you were running on gets flaky or dies, which does happen from time to time) It is faster to launch an EBS backed instance because the image does not have to be fetched from S3. If the hardware your EBS-backed instance is scheduled for maintenance, stopping and starting the instance automatically migrates to new hardware. I was also able to move an EBS-backed instance on failed hardware by force-stopping the instance and launching it again (your mileage may vary on failed hardware).

我是Amazon的忠实用户,在技术beta版一出来,我就把所有实例都切换到EBS支持的存储。我对结果非常满意。

EBS仍然可能失败——这不是一颗银弹

Keep in mind that any piece of cloud-based infrastructure can fail at any time. Plan your infrastructure accordingly. While EBS-backed instances provide certain level of durability compared to ephemeral storage instances, they can and do fail. Have an AMI from which you can launch new instances as needed in any availability zone, back up your important data (e.g. databases), and if your budget allows it, run multiple instances of servers for load balancing and redundancy (ideally in multiple availability zones).

什么时候不做

At some points in time, it may be cheaper to achieve faster IO on Instance Store instances. There was a time when it was certainly true. Now there are many options for EBS storage, catering to many needs. The options and their pricing evolve constantly as technology changes. If you have a significant amount of instances that are truly disposable (they don't affect your business much if they just go away), do the math on cost vs. performance. EBS-backed instances can also die at any point in time, but my practical experience is that EBS is more durable.

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

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

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