1

Suppose the primary RDS instance dies and it automatically fails over to the standby instance. At that point, do I need to do anything? Or does AWS automatically create a new standby instance, so that the whole situation recovers to the status before the fail over happened?

5

As far as i am aware , with multi-az AWS RDS , aws keeps a replica instance on the standby mode in another availability zone and fails over by pointing the dns endpoint to the standby instance automatically if the main instance dies. So the failover happens automatically with you having to do nothing much from the aws side. Also aws recovers the unhealthy instance automatically but will NOT failback to the recovered instance. All you need to take care is of that your application adapts to this dns change and automatically re-establishes connections if any connections fail , especially if you are using connection pooling from the app side.

3
  • 1
    This is essentially all there is to it. The standby server is running but MySQL it is not externally accessible, even if you know the IP of the standby unit. There is something additional that happens around the same time as the DNS change that makes it accessible, but whatever that process is, it's transparent to the user. If an application can recover from dropped, hung, or unresponsive database connections, and rechecks DNS with each connection (or reasonably often) then it should be able to recover from an RDS failover. – Michael - sqlbot Aug 29 '17 at 21:13
  • Thanks for your answer Rohit and Michael. Let me clarify it: if the failed instance is recovered, it will become the new standby, so that if the new primary instance fails, we can fail over to this new standby, right? And, if the failed instance could not be recovered, AWS will launch a new instance to act as the new standby. Right? – Silly Dude Aug 30 '17 at 0:50
  • Yes , this is exactly what happens. – Rohit Nagpal Aug 30 '17 at 5:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.