Question #1439
A company is migrating its production database to AWS and requires an Amazon RDS for PostgreSQL setup that ensures high availability with automatic failover in under 40 seconds. The company also wants to distribute read traffic away from the primary instance while minimizing operational costs.
Which solution meets these requirements?
Deploy an Amazon RDS Multi-AZ DB instance with one read replica and direct read workloads to the read replica.
Deploy an Amazon RDS Multi-AZ DB cluster with two read replicas and direct read workloads to the read replicas.
Deploy an Amazon RDS Multi-AZ DB instance and direct read workloads to the standby instance in the Multi-AZ configuration.
Deploy an Amazon RDS Multi-AZ DB cluster and direct read workloads to the cluster's reader endpoint.
Explanation
Option D is correct because:
1. High Availability & Fast Failover: Amazon RDS Multi-AZ DB clusters (available for PostgreSQL) deploy a writer instance and two reader instances across three Availability Zones (AZs). Failover to a healthy instance occurs in under 35 seconds, meeting the <40-second requirement.
2. Read Traffic Distribution: The cluster's reader endpoint automatically routes read queries to the two reader instances, offloading the primary writer instance.
3. Cost Efficiency: The cluster's built-in reader instances eliminate the need for separate read replicas, reducing operational complexity and costs.
Why other options are incorrect:
- A: A Multi-AZ DB instance with a read replica incurs additional costs for the replica and does not guarantee sub-40-second failover.
- B: Multi-AZ DB clusters do not require additional read replicas, as they include reader instances by default.
- C: The standby instance in a standard Multi-AZ configuration cannot serve read traffic; it is solely for failover.
Key Points:
- Multi-AZ DB clusters offer faster failover (<35s) compared to standard Multi-AZ (~60s).
- Use the reader endpoint to distribute read traffic in a Multi-AZ DB cluster.
- Built-in reader instances reduce costs vs. standalone read replicas.
Answer
The correct answer is: D