[RDS] When failover happen, the reader instance is promoted to the new writer instance, will RDS automatically create a new reader instance?

0

What if I have auto-scaling enabled? Will RDS trigger the auto-scaling and create a new reader for me?

If none above will create a new reader, then it is better to have at least 2 readers in my cluster right? Since after failover, I will have no readers in my cluster, then all of my traffic which was pointed at reader endpoint would start to fail?

已提問 3 個月前檢視次數 285 次
2 個答案
2
已接受的答案

Hello.

When a failover occurs, the RDS instance that was originally the writer instance becomes the reader instance.
Therefore, there is no particular problem as long as the reading process is performed on the reader endpoint.

It is a good idea to have multiple reader instances to reduce the downtime of read processing during failover.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.AuroraHighAvailability.html#Aurora.Managing.FaultTolerance

In Aurora MySQL 2.10 and higher, you can improve availability during a failover by having more than one reader DB instance in a cluster. In Aurora MySQL 2.10 and higher, Aurora restarts only the writer DB instance and the reader instance to which it fails over. Other reader instances in the cluster remain available during a failover to continue processing queries through connections to the reader endpoint.

profile picture
專家
已回答 3 個月前
profile picture
專家
已審閱 3 個月前
profile pictureAWS
專家
已審閱 3 個月前
  • However if the original writer was having issue, what good to make it the new reader?

2

Hi,

If you want to automatically create a new read instance (to avoid re-use of failed one), you can use the RDS-EVENT-0013 in AWS EventBridge to trigger a Lambda that will automatically create a new and fresh read instance.

See doc for events: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Messages.html#USER_Events.Messages.instance

Best,

Didier

profile pictureAWS
專家
已回答 3 個月前
profile picture
專家
已審閱 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南