Ad

How To Fail Back To The First Region In Amazon Aurora Global Database

- 1 answer

I am following the official documentation here https://aws.amazon.com/getting-started/hands-on/aurora-global-database/

which says:

Note: After failover, the newly promoted cluster in Europe (Paris) Region becomes a Regional aurora cluster. Once promoted you cannot add the new DB cluster back to the old Aurora Global Database as a secondary region. If you want to fail back to original region US-East (N. Virginia) or add a secondary cluster in different AWS Region, you need to repeat the steps 6 to 8 by creating a new Aurora Global Database with the newly promoted cluster as the primary cluster. See Failover for Aurora Global Database.

I am wondering about the following:

  1. On what basis does the failover happen to secondary region? Does it happen only when the primary region is down? If I have a custom failover strategy then, can that be tied to amazon aurora global database failover as well?

  2. When the failover happens, does it promote the secondary region's aurora to master automatically?

  3. After failover, if I need to fail back to the primary region then, can I flip the the direction of replication back to primary from secondary somehow? Is there an automated way to do that?

Ad

Answer

Unfortunately at the moment the Aurora service does not perform the failover itself (although you could automate this through CloudWatch and Lambda triggers).

Q: Will Aurora automatically fail over to a secondary region of an Aurora Global Database?

No. If your primary region becomes unavailable, you can manually remove a secondary region from an Aurora Global Database and promote it to take full reads and writes. You will also need to point your application to the newly promoted region.

When the failover occurs the promoted instance becomes separated from the cluster, and it will become its own cluster with its own reads and writes. At this point there is no relationship between the clusters anymore your application would need to be retargeted to use this endpoint instead.

To flip back you would need to recreate an Aurora cluster in the previous region (or copy the DB changes back to the previous cluster). The simpler route might be to create a global database back to the original region then failover and retarget your application at this one.

Amazon has recently enabled write forwarding for global databases so in theory you could retarget the application back to the original region before you failover.

Ad
source: stackoverflow.com
Ad