Certopolis

AWS Certified Solutions Architect – Associate

RDS Multi-AZ vs read replicas: failover vs scaling reads

Multi-AZ is for availability: RDS keeps a synchronous standby in another Availability Zone and fails over to it automatically. A read replica is for scaling reads: it is updated asynchronously, accepts read-only connections, and only becomes writable when you promote it. A Multi-AZ DB cluster does both, with two readable standbys.

Multi-AZ DB instance deployment

RDS provisions a standby in a different Availability Zone and replicates to it synchronously. The standby provides failover support but does not serve read traffic. AWS says plainly that this option is not a scaling solution for reads.

If the primary fails, RDS switches to the standby without administrator action. Failover typically takes 60 to 120 seconds. RDS changes the DNS record of the DB instance to point at the standby, so the endpoint name stays the same but clients must reconnect.

Multi-AZ DB cluster deployment

A Multi-AZ DB cluster has one writer and two reader DB instances in three Availability Zones in the same Region. Replication is semisynchronous: a commit needs acknowledgment from at least one reader.

The readers are automatic failover targets and also serve read traffic. AWS states that this mode gives lower write latency than a Multi-AZ DB instance deployment. It is not the same thing as an Aurora DB cluster.

Read replicas

RDS takes a snapshot of the source, creates a read-only instance from it, then replicates changes asynchronously. Use replicas to offload read-heavy queries or business reporting from the primary.

A replica can live in another Region. For disaster recovery you promote it to a standalone DB instance; promotion is a deliberate action, not automatic failover. RDS does not auto scale read replicas, so you add and remove them yourself.

You can combine both: a primary can copy synchronously to a Multi-AZ standby and asynchronously to a read replica at the same time.

Where the exam catches people

  • Believing a Multi-AZ standby can take reporting queries: in a Multi-AZ DB instance deployment the standby can't serve read traffic.
  • Believing a read replica gives automatic failover: a replica is promoted by hand; automatic failover inside a Region comes from Multi-AZ.
  • Believing read replicas use synchronous replication: RDS updates read replicas asynchronously, so they can lag the primary.
  • Believing RDS adds read replicas as load grows: RDS doesn't support autoscaling of read replicas.
  • Believing a Multi-AZ DB cluster is an Aurora cluster: it is an RDS deployment mode with one writer and two readable standbys.

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 runs an Amazon RDS for MySQL DB instance with one cross-Region read replica for disaster recovery. The company needs writes to resume without manual intervention if the primary Availability Zone fails. Which solution meets 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.

    Show the full explanation and doc quotes

    A read replica is the other instrument: asynchronous, readable, and promoted deliberately rather than automatically, which makes it the answer to a Regional outage and not to the loss of one Availability Zone. The two are complementary, and this deployment has only the second.

    Written from docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html

  2. A reporting workload is overwhelming an Amazon RDS for PostgreSQL DB instance that already runs as a Multi-AZ DB instance deployment. A solutions architect must move the reporting queries off the writer without changing the application's write path, and the company wants the reporting endpoint to survive the loss of an Availability Zone. Which approach will meet these requirements?

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

    Not that one: D 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

    "A Multi-AZ DB instance deployment has one standby DB instance that provides failover support, but doesn't serve read traffic. When the deployment has two standby DB instances, it's called a Multi-AZ DB cluster deployment. A Multi-AZ DB cluster deployment has standby DB instances that provide failover support and can also serve read traffic." The company already has the first shape, whose standby cannot be queried. Converting to a Multi-AZ DB cluster gives standbys that both fail over and serve reads, and the cluster exposes a reader endpoint for exactly this traffic.

    Written from docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html

  3. A company runs an Amazon RDS for PostgreSQL DB instance in a single Availability Zone. The company must keep a synchronously replicated standby copy in a second Availability Zone for high availability. The company must also move its business reporting queries off the primary DB instance to a copy that accepts read-only connections. 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: D,E is right. In the game your Design Resilient Architectures building would lose a little Renown, and this question would come back later.