简体   繁体   English

AWS NVMe存储-托管数据库

[英]AWS NVMe Storage - hosting a database

Now that AWS are offering NVMe through the i3 range of servers, is there a best practice for hosting a database on the instance storage of one of these? 现在,AWS通过i3系列服务器提供NVMe,是否有最佳实践在其中之一的实例存储上托管数据库?

My understanding is that if the instance is stopped, the storage may be completely wiped. 我的理解是,如果实例停止,则存储可能会被完全擦除。 This doesn't appear to be the case if the server reboots, intentionally or unintentionally, but you are still one button press away from wiping important data so this is quite scary. 如果服务器有意或无意地重新引导,情况似乎并非如此,但是您仍然需要按一个按钮来清除重要数据,所以这很可怕。

My understanding of the underlying infrastructure is that this is because the NVMe storage is directly attached to the physical host, and therefore if Amazon decide to move your VM to another host you would lose your data. 我对底层基础架构的理解是,这是因为NVMe存储直接连接到物理主机,因此,如果Amazon决定将您的VM移至另一台主机,则会丢失数据。 Also it would be bad to store mission-critical data on a single hardware device AWS aside. 同样,将关键任务数据存储在一个单独的AWS硬件设备上也很糟糕。

But given the performance benefits of NVMe over EBS (SAN?) storage, what would a recommended setup be? 但是考虑到NVMe优于EBS(SAN)存储的性能优势,推荐的设置是什么? VM Replicas, transaction log backups to permanent storage, etc. VM复制,将事务日志备份到永久存储等。

It is possible to turn the NVMe SSDs on i3 instances into persistent highly available storage. 可以将i3实例上的NVMe SSD变成持久的高可用性存储。

Options: 选项:

1) Mirroring between NVMe SSDs on 2 or 3 instances 1)在2个或3个实例上的NVMe SSD之间进行镜像

2) Mirroring between NVMe SSDs and EBS (EBS can be on a different instance) with reads primarily from NVMe SSDs. 2)NVMe SSD和EBS之间的镜像(EBS可以在不同的实例上),主要从NVMe SSD读取。

While write performance will still be limited by network or EBS, you do get full read performance of NVMe. 尽管写入性能仍然会受到网络或EBS的限制,但您确实可以获得NVMe的完整读取性能。 In most cases read bandwidth is what large databases really need for running heavy queries. 在大多数情况下,读取带宽是大型数据库运行大量查询所真正需要的。

However, there are still questions about failing over the database between the instances and restoring redundancy after instance stop/start of failure. 但是,仍然存在有关在实例之间进行数据库故障转移以及在实例停止/启动故障后恢复冗余的问题。

Check this whitepaper and page 9 specifically for details about how it is done for Oracle database clusters: https://www.flashgrid.io/wp-content/sideuploads/resources/FlashGrid_OracleRAC_on_AWS.pdf 请查阅此白皮书和第9页,以获取有关如何对Oracle数据库集群进行操作的详细信息: https : //www.flashgrid.io/wp-content/sideuploads/resources/FlashGrid_OracleRAC_on_AWS.pdf

The paper is focused on Oracle RAC databases, but same solution works for single-instance Oracle and also for any other Linux-based database. 本文的重点是Oracle RAC数据库,但是相同的解决方案适用于单实例Oracle以及任何其他基于Linux的数据库。 Although, you would still need Oracle Clusterware (free). 虽然,您仍然需要Oracle Clusterware(免费)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM