题记:当将MySQL实例移动到AWS时,你可能需要选择使用RDS还是EC2。本文将重点介绍一些需要考虑的关键因素,以帮助您确定哪种是服务您的数据的最具成本效益的解决方案。 When moving your MySQL instances to AWS, you would probably have to deal with this decision. This article will highlight some of the key factors that need to be considered in order to help you determine which is the most cost-effective solution for serving your data. 当将MySQL实例移动到AWS时,你可能需要选择使用RDS还是EC2。 本文将重点介绍一些需要考虑的关键因素,以帮助您确定哪种是服务您的数据的最具成本效益的解决方案。 简介 RDS is based on EC2, so in this post I will focus on the benefits and disadvantages of using the former, versus migrating MySQL into user-managed EC2 instances. RDS是基于EC2的,因此在本文中,我将重点介绍使用RDS的优缺点,与将MySQL迁移到用户管理的EC2实例做对比。 The value of RDS resides in simplified provisioning and administration. Several of the most common maintenance tasks such as minor version upgrades, backups, and slave creation are automated and can be managed from the AWS console. On the other hand, RDS imposes some limitations to MySQL functionality so it could be offered “as a Service” while delivering a safe and consistent user experience. RDS的价值在于简化供应和管理。 一些最常见的维护任务(例如小版本升级,备份和从属创建)是自动的,可以从AWS控制台进行管理。 另一方面,RDS对MySQL功能增加了一些限制,可以以服务的方式进行提供,同时保障安全和用户体验一致性。 Within those limitations we can mention 这些限制包括:
MySQL RDS pros and cons in bullets MySQL RDS的主要优点:
成本评估 A quick estimation comparing RDS and EC2 for similar instances and storage shows that RDS is between 40 and 68% more expensive than EC2: 通过相似的实例和存储来比较,对RDS和EC2的简单评估显示RDS比EC2贵40至68%:
## MySQL on EC2
-Instances: 3 x m2.4xlarge -Storage: 3 1Tb EBS volumes (provisioned IOPS 3000 IOPS) 100Gb/month of snapshots space -Intra-Region Data Transfer: 40Gb/Month On-demand instances USD $3465 per month Reserved instances (1 year, partial upfront) USD $1490 per month ## MySQL RDS
-Instance type: 1 x db.m2.4xlarge -Multi-AZ: yes -Storage: 1Tb (provisioned IOPS 3072 IOPS) -Backup space: 100Gb/month -Intra-Region Data Transfer: 40Gb/Month On-demand instances USD $6557 per month Reserved instances (1 year, partial upfront) USD $2930 per month The above costswere estimated using AWS simple monthly calculator 上述的成本评估是基于AWS的每月计算 总结 There is no right or wrong decision when choosing which AWS solution is better for MySQL. 选择哪个AWS解决方案更适合MySQL时,没有正确或错误的决定。 RDS is a powerful option if your data is already in InnoDB(and only in InnoDB) and you are looking for a simple, low-maintenancedeployment. When other engines and more complex topologies come into the scene,or even the need for MySQL plugins, then going to EC2 is a better option. 当数据已经在InnoDB中(并且仅在InnoDB中),如果你正在寻找一个简单,低维护的部署,则RDS是不错的选择。如果涉及到其他引擎和更复杂的拓扑,甚至需要MySQL插件,那么此时选择EC2会更好。 Anycritical process or script running locally on a MySQL instance could also bethe decisive factor for choosing EC2, usually because of the time spent inmoving the data through the network. Finally, the cost is definitely a keyfactor, especially when moving several instances into RDS. 在MySQL实例上本地运行的任何关键进程或脚本都可能是选择EC2的决定性因素,通常是因为花费在通过网络移动数据的时间。 最后,成本绝对是一个关键因素,特别是当将几个实例移入RDS时。 如何加入"云和恩墨大讲堂"微信群 搜索 盖国强(Eygle)微信号:eyygle,或者扫描下面二维码,备注:云和恩墨大讲堂,即可入群。每周与千人共享免费技术分享,与讲师在线讨论。 |