[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?

Dawn
asked 2 months ago264 views
2 Answers
2
Accepted Answer

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
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago
profile pictureAWS
EXPERT
reviewed 2 months ago
  • 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
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions