Aurora failover and promotion tiers vs RDS Multi-AZ (DOP-C02)
Aurora keeps copies of the data across Availability Zones whatever the instance count, but fast failover needs an Aurora Replica to promote. The Aurora User Guide says a replica is promoted typically in under 60 seconds, chosen by promotion tier. An RDS Multi-AZ DB instance instead fails over to a synchronous standby that serves no reads.
What happens when an Aurora writer fails?
Aurora separates storage from compute. Data written to the primary instance is replicated synchronously to six storage nodes across Availability Zones, even if the cluster has a single DB instance. The data survives a zone failure. The DB instances are a separate matter.
If the cluster has one or more Aurora Replicas, Aurora promotes one to be the new primary. Service is typically restored in less than 60 seconds, and often less than 30. If the cluster has no replicas, Aurora recreates the primary host in the same Availability Zone, which typically takes less than 10 minutes.
If a whole zone is lost and the cluster has reader instances in other zones, Aurora fails over to one of them. If the cluster has a single instance, or all instances sit in the same zone, you must create new DB instances in another zone yourself. AWS recommends at least one replica in a different zone. The cluster endpoint always points at the current primary, so connection strings survive a failover.
How does Aurora pick the failover target?
Each Aurora Replica has a priority from 0, the highest, to 15, the lowest. Aurora promotes the replica with the highest priority. Replicas that share a priority form a promotion tier.
Within a tier, Aurora promotes the largest replica. If two replicas share both tier and size, the choice between them is arbitrary. To make the order certain, give the replicas different tiers. Changing a priority does not trigger a failover. A cluster can have up to 15 Aurora Replicas.
How is RDS Multi-AZ different?
A Multi-AZ DB instance deployment keeps one synchronous standby replica in a different zone. RDS switches to it automatically, typically in 60 to 120 seconds, and changes the DNS record of the DB instance to point at the standby. The endpoint stays the same, but existing connections must be re-established. The standby cannot serve read traffic. Rebooting the instance with failover forces a failover on demand.
A Multi-AZ DB cluster has a writer and two reader DB instances in three zones, with semisynchronous replication. The readers serve read traffic and are the failover targets. RDS promotes the reader with the most recent change record, so the instance that becomes the writer can differ each time.
Where the exam catches people
Believing a single-instance Aurora cluster fails over to another zone: the data is in several zones, but with no replica the host is recovered in the same zone.
Believing two replicas in the same tier and of the same size are promoted in a fixed order: the choice is arbitrary. Use different promotion tiers.
Believing tier 15 is the highest priority: 0 is the highest and 15 the lowest.
Believing the standby of a Multi-AZ DB instance can serve reads: it cannot. Use a Multi-AZ DB cluster or a read replica.
Believing a fixed reader instance stays a reader in a Multi-AZ DB cluster: either reader can be promoted, depending on which has the most recent change record.