Certopolis

AWS Certified Solutions Architect – Associate

Aurora Global Database vs cross-Region read replicas

An Aurora global database has one primary DB cluster that takes writes and up to 10 read-only secondary clusters in other Regions. Aurora replicates at the storage layer with latency typically under a second. Use a switchover for planned Region moves with no data loss, and a failover to recover from a Regional outage.

How it works

Writes go only to the primary cluster. Aurora copies changes to the secondaries through the cluster storage volume, not the database engine, so replication has little effect on the primary. Each secondary can have up to 16 read-only instances, one more than a standalone cluster.

The Aurora Global Database writer endpoint always points at the current primary, even after a switchover or failover. Write forwarding lets a secondary cluster send write statements to the primary, so an application in the secondary Region can insert rows without moving the primary.

Aurora Auto Scaling is not supported on secondary clusters. Aurora Serverless v2 reader instances can scale reader capacity there instead.

Switchover vs failover

A switchover, formerly called managed planned failover, is for healthy databases: Regional rotation, follow-the-sun writes, or failing back. Aurora waits for the target secondary to synchronize, so RPO is 0.

A failover is for an unplanned outage. It does not wait for synchronization, so some unreplicated writes can be lost; RPO is typically measured in seconds and RTO can be in the order of minutes. Before failing over, take applications offline and lower DNS cache TTLs to reduce split-brain risk. A manual alternative is to detach a secondary and promote it to a standalone cluster.

For Aurora PostgreSQL, the rds.global_db_rpo parameter sets an upper bound on RPO by pausing commits on the primary when every secondary falls behind. With two Regions, AWS recommends leaving it at the default in the secondary's parameter group.

Compared with cross-Region read replicas

Aurora MySQL can also use binlog-based cross-Region read replicas, up to five per source cluster. AWS presents the global database as the lower-lag alternative because storage-level replication needs no binlog configuration and keeps the engine free for the workload.

Where the exam catches people

  • Believing a secondary cluster accepts writes: secondaries are read-only; write forwarding sends their writes to the primary.
  • Believing failover is the right choice for a planned Region rotation: switchover is for healthy databases and loses no data.
  • Believing managed failover never loses data: it does not wait for synchronization, so unreplicated writes can be lost.
  • Believing Aurora Auto Scaling can add replicas to a secondary cluster: it is not supported there.
  • Believing an Aurora global database is limited to five secondary Regions: the current limit is up to 10 secondary clusters.

Written from Amazon Web Services's documentation

Try 3 questions on this

Pick an answer to see why each option is right or wrong.

  1. A company rotates the Region that serves its writes once a quarter as a resilience exercise. Its Aurora global database is healthy at the time of each rotation, engine versions match across clusters, and the exercise must complete without losing committed transactions. Which approach will meet these requirements?

    Right. In the game that’s Renown for your Design Resilient Architectures building.

    Not that one: B is right. In the game your Design Resilient Architectures building would lose a little Renown, and this question would come back later.

  2. A company runs an Amazon Aurora PostgreSQL global database with a primary DB cluster in one AWS Region and one secondary DB cluster in a second Region. A regulator requires that a failover never loses more than 60 seconds of committed transactions, and the company accepts that writes can pause to hold that limit. After a failover, the new primary must accept writes at once, and the application must reach it without a connection string change. Which combination of steps should a solutions architect take to meet these requirements? (Select TWO.)

    Right. In the game that’s Renown for your Design Resilient Architectures building.

    Not that one: A,E is right. In the game your Design Resilient Architectures building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    The disaster recovery page says that with an Aurora PostgreSQL-based global database "you can manage the recovery point objective (RPO) for your Aurora global database by using the rds.global_db_rpo parameter." Where the parameter goes is the deciding behaviour. The same page warns: "In a global database with only two AWS Regions, we recommend keeping the rds.global_db_rpo parameter's default value in the secondary Region's parameter group. Otherwise, performing a failover due to a loss of the primary AWS Region could cause Aurora to pause transactions." That rules out B for a company whose new primary must accept writes at once. For E, the connection page says the global writer endpoint is "automatically updated by Aurora to route requests to the current writer instance of the primary DB cluster."

    Written from docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-disaster-recovery.html

  3. An Aurora global database has its primary cluster in one Region and a secondary in another. A team deploys its application to the secondary Region for local reads, and a small part of that application must also insert rows. The primary must stay where it is, and the team does not want a second database to reconcile. Which approach will meet these requirements?

    Right. In the game that’s Renown for your Design Resilient Architectures building.

    Not that one: A is right. In the game your Design Resilient Architectures building would lose a little Renown, and this question would come back later.