[英]While hosting my web app on cloud, should I install my db on the EC2 instance or should i use RDS service?
While hosting my web app on cloud, should I install my db on the EC2 instance or should i use RDS service ? 在将我的Web应用程序托管在云上时,应该在db2实例上安装数据库还是应该使用RDS服务? Some points come up :
一些要点:
You can do either, and I have done both, but the absolute better practice is to use RDS for your database and EC2 for the websites, unless you have a really good reason not to (and if you are not sure if you have a good reason, then you probably don't). 您可以做任何一个,而我都做过,但是绝对更好的做法是对数据库使用RDS,对网站使用EC2,除非您确实有很好的理由不这样做(并且如果不确定是否有一个很好的理由)。原因,那么您可能不知道)。
I ran DB's on the instances using SQL Server for years, for a few low-traffic sites, and had no problems. 我在使用SQL Server的实例上运行DB已有多年,仅用于一些低流量站点,并且没有任何问题。 I finally moved the last of these off of my EC2 instances and into RDS and wish I had done in years ago.
我终于将其中的最后一个移出了我的EC2实例,并移到了RDS中,希望我几年前就做过。
For a small, low-traffic site, you can get away with it, but as traffic picks up on your site, and you want to add the ability to autoscale your front-end, keeping the database on the instance is no longer an option. 对于小型,低流量的站点,您可以摆脱它,但是随着站点上流量的增加,并且您希望增加自动扩展前端的功能,将数据库保留在实例上不再是一种选择。 When you have upto 5-10-20 EC2 web instances balancing web traffic, and you want to add or remove instances dynamically to conserve resource (ie money), you'll be really happy the database is not on the single instance.
当您拥有最多5-10-20个EC2 Web实例来平衡Web流量,并且想要动态添加或删除实例以节省资源(即金钱)时,您将很高兴数据库不在单个实例上。
Besides that the automatic backups, the ability to restore to point-in-time, and they ability to take an RDS snapshot, and spin up a new RDS instance for development or testing purposes is really convenient. 除了自动备份之外,还具有还原到时间点的能力以及创建RDS快照和启动新的RDS实例以进行开发或测试的能力,这确实非常方便。
Ultimately, everything that RDS does for you, you could do for yourselve using a fleet of EC2 instances, and a lot of time and money, but like I said, if you don't have the time, money or expertise (or the compelling reason) to set that redundancy up youself, then why bother. 最终,RDS为您所做的一切,都可以使用大量的EC2实例自行完成,并且花费了大量的时间和金钱,但是就像我说的那样,如果您没有时间,金钱或专业知识(或令人信服的原因)来自己设置冗余,那又何必呢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.