Question

Difficulty: MediumOptimizing Compute and Storage Performance

A company runs a high-volume OLTP application on an Amazon RDS for PostgreSQL database configured in a Multi-AZ deployment. During end-of-month reporting cycles, users experience significant performance degradation and query timeouts on their analytics dashboards. Monitoring metrics show that the primary database instance is experiencing CPU utilization near 100%100\% and high read IOPS, while write transaction response times increase. The analytics queries are strictly read-only. Which of the following optimization strategies should the solutions architect implement to resolve the performance bottleneck in a cost-effective and operationally efficient manner?

  1. A
    Configure the reporting dashboards to point to the DNS endpoint of the standby instance in the secondary Availability Zone of the Multi-AZ deployment.
  2. B
    Request AWS Support to pre-warm an Application Load Balancer placed in front of the RDS database instances to load balance the database connection requests.
  3. Create one or more Amazon RDS PostgreSQL Read Replicas and update the reporting application to route the read-only query traffic to the read replica endpoints.Answer
  4. D
    Purchase EC2 Instance Savings Plans to automatically cover the compute cost of the database instances as they scale during reporting periods.

Answer

Create one or more Amazon RDS PostgreSQL Read Replicas and update the reporting application to route the read-only query traffic to the read replica endpoints.
Creating one or more Amazon RDS PostgreSQL Read Replicas is the correct strategy because standard RDS PostgreSQL Read Replicas allow read-only query workloads to be offloaded from the primary write instance, thereby reducing CPU and IOPS contention. This is supported by PostgreSQL read replicas, which run independently of the Multi-AZ standby.

Step-by-Step Solution

1
Analyze the metrics and determine that read-only analytical queries are causing CPU and resource contention on the primary database instance.
The bottleneck is identified as read traffic conflict on the write-optimized primary instance.
Understanding the nature of the database workload is required to select the correct scaling model.
2
Evaluate the capabilities of Amazon RDS Multi-AZ standby instances and database load balancing options.
Determine that standby instances in RDS Multi-AZ cannot serve read traffic and that ALBs cannot load balance database connections directly.
Eliminating options that are technically unfeasible or do not support read workloads.
3
Deploy one or more RDS PostgreSQL Read Replicas and modify the reporting dashboard connection endpoints.
The reporting queries are routed to the Read Replicas, offloading CPU and IOPS demands from the primary instance.
Implementing horizontal read scaling resolves the performance issues on the primary database.

Key Concept

Horizontal scaling of database read workloads using Read Replicas in Amazon RDS.
Rate this question