0
votes

If a primary Aurora DB instance dies for some reason, and an existing replica gets promoted to the new primary, does a new replica instance get created so that I end up with the same number of read replicas?

If so, how long does it take for a new replica to be spun up on average?

2

2 Answers

0
votes

There are two types of read replicas:

  1. Backup replica (also known as slave) made by AWS when you deploy Multi-AZ RDS instance. That is synchronous read replica, but you can not use it.
  2. Read replica created by you. Those are asynchronous replicas that you can use to offload some work.

A backup replica will be promoted to master automatically, usually it takes less than a minute. And yes, AWS will create new slave for the RDS instance that's now the master. It could take from several minutes to several hours depending on your workload and DB size.

Read replicas created by you will be just switched to the new master.

0
votes

AWS Aurora is AWS's database with an architecture designed for cloud computing technologies. One of it's differences is that data is stored in a storage architecture similar to S3, in a cluster volume, which is a single, utilizes solid state disk (SSD) drives and consists of copies of the data across multiple Availability Zones in a single region. That has a few advantages, such as durability and also the fact that is distributed through in entire region, not just an AZ, helping with consistency between replicas and performance.

enter image description here

In case you have read replicas and your Master fails, one of them will become Master without downtime.

If you don't have a read replica, a new Master instance will be created and the process is really fast. Since data is on clusterized across the region, not on the server's disk, the process is fast, but there is downtime.

As AWS says:

To increase availability, you can use Aurora Replicas as failover targets. That is, if the primary instance fails, an Aurora Replica is promoted to the primary instance with only a brief interruption during which read and write requests made to the primary instance fail with an exception. If your Aurora DB cluster does not include any Aurora Replicas, then the primary instance is recreated during a failure event. However, promoting an Aurora Replica is much faster than recreating the primary instance. For high-availability scenarios, we recommend that you create one or more Aurora Replicas, of the same DB instance class as the primary instance, in different Availability Zones for your Aurora DB cluster. For more information on Aurora Replicas as failover targets, see Fault Tolerance for an Aurora DB Cluster.

You can read more on: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Replication.html"