在 Amazon EBS 而不是 EC2 实例上运行数据库有什么好处?
我需要托管一个带有底层数据库的网站。我知道我可以在实例本身上运行数据库,也可以将其放在 EBS 卷上。我会经常备份到 S3,我想知道在 EBS 上运行数据库而不是实例本身有什么好处。
I'm going to need to host a website with an underlying database. I know I can either run the database on the instance itself, or I can have it on an EBS volume. I'm going to be backing up to S3 every so often, and I was wondering what the benefits were of running the database on EBS and not the instance itself.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
EBS 卷会很快,超级快。它基本上作为驱动器附加到您的实例。然而,这样做的一个缺点是您一次只能将其附加到一个实例。我听说过 EBS 卷下降...这篇文章讨论了其中的一些内容...我只是让它存在于它自己的实例上,如果它是一个小型数据库,则从那里对其进行快照。
http://agilesysadmin.net/ec2-outage-lessons
The EBS volume will be fast, super fast. It's basically attached to your instance as a drive. However a drawback to this is that you'll only be able to attach it to one instance at a time. I've heard of EBS volumes dropping...this article talks about some of that stuff...i would just let it live on the instance it self, and snapshot it from there if it's going to be a small db.
http://agilesysadmin.net/ec2-outage-lessons
如果您的实例崩溃,实例存储将会消失。 EBS更可靠。可以说,您甚至不需要额外的 S3 副本(与任何数据库一样,您需要正常备份)。
Instance storage will disappear if your instance crash. EBS is more reliable. Arguably you don't even need additional S3 copy (bit you need normal backup as with any database).
如果您的实例崩溃,实例存储将会消失,+ EBS 卷最近遇到了一个很好的问题 - 虽然这比实例存储好,但我建议您看看 Amazon 关系数据库服务 (Amazon RDS)。我在我的一个项目中使用过它,它非常酷。
Amazon RDS 具有相当好的优势,包括:
当您将 EBS 与 RDS 进行比较时,两者的费用都比 EBS 少,但 RDS 的额外费用却很少,但这是值得的。亚马逊负责一切,如果您的网站是流量驱动的,它有自动复制的解决方案。
Instance store will disappear if your instance is crashed, + EBS volume got quite a good problem recently - though this is good over instance-store, I would suggest you to have a look at Amazon Relational Database Service (Amazon RDS). I had used it for one my project and it's super cool.
Amazon RDS has got quite good advantages, featuring:
When you compare EBS with RDS, both are charged where as little extra on RDS when compared to EBS, but its worth it. Amazon takes care of everything and if your site is traffic-driven, it has got solution to replicate automatically.