简体   繁体   English

降级AWS RDS实例

[英]Downgrade AWS RDS Instance

I am using t2.large RDS instance, I want to downgrade to t2.micro to fit my current business. 我正在使用t2.large RDS实例,我想降级到t2.micro以适合我目前的业务。 I have a few question to ask: - How can I downgrade RDS instance without losing data and downtime ? 我有几个问题要问:-如何在不丢失数据和停机的情况下降级RDS实例? 在此处输入图片说明 Thanks, 谢谢,

You can't really do it without downtime, but you could minimize the downtime. 没有停机时间,您实际上无法做到这一点,但是您可以将停机时间减至最少。

The easiest option is to Modify the DB instance. 最简单的选项是修改数据库实例。 This will result in downtime because a new database will be provisioned, the data will be relocated and the DNS name will be changed to point to the new instance. 这将导致停机,因为将提供新的数据库,将重新定位数据,并且将DNS名称更改为指向新实例。

Seeing that you believe a t2.micro will be sufficient for your database, it would be fair to assume that there would be times when your database is not in use so that you can perform the Modify operation. 鉴于您认为t2.micro对于您的数据库已经足够了,因此可以合理地假设某些情况下您的数据库未使用,以便您可以执行Modify操作。 It should only take a few minutes. 只需要几分钟。

Officially, the best way to modify a database without downtime is to use Multi-AZ , which can update one node while traffic is still being served by another node. 正式地,在不停机的情况下修改数据库的最佳方法是使用Multi-AZ ,它可以在一个节点仍在提供流量的同时更新一个节点。 However, your goal seems to be to reduce cost, rather than spending more to ensure uptime. 但是,您的目标似乎是降低成本,而不是花费更多的时间来确保正常运行时间。

By the way, a t2.micro is quite limited in terms of CPU and network bandwidth. 顺便说一句, t2.micro在CPU和网络带宽方面非常有限。 You are trying to save 21c per day, at the potential cost of having a poorly-responding database. 您正在尝试每天节省21c,这可能是因为数据库响应速度较慢。

You can consider creating a read replica (t2.micro) of the master instance (t2.large). 您可以考虑创建主实例(t2.large)的只读副本(t2.micro)。 Once the read replica is in sync with the master instance, you can promote the read replica and then point the application towards the new master instance (which is the promoted read replica). 只读副本与主实例同步后,您可以升级只读副本,然后将应用程序指向新的主实例(即升级的只读副本)。

For reference, see: 供参考,请参阅:

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

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