AWS Certified Developer – Associate / Question #792 of 557

Question #792

A company operates a three-tier application deployed on Amazon ECS, utilizing an Amazon RDS for PostgreSQL database. The application experiences significantly more read operations than writes. During periods of high traffic, the application's performance deteriorates, and the CloudWatch metrics show a sharp increase in the DBReadLatency. How can a developer enhance the application's performance most effectively?

A

Implement Amazon ElastiCache to cache frequently accessed query results.

B

Scale out the ECS service by increasing the number of tasks.

C

Provision additional RDS read replicas to distribute read traffic.

D

Adjust the ECS task definition to allocate more CPU shares.

Explanation

The question highlights high DBReadLatency during traffic spikes in a read-heavy application. Option A (ElastiCache) is correct because caching frequently accessed query results reduces the number of direct reads on the RDS database, alleviating latency.

Option C (RDS read replicas) also addresses read scaling but requires application changes to distribute reads. However, the question emphasizes 'frequently accessed query results,' making caching more efficient. Options B and D focus on the ECS layer, which does not resolve the database bottleneck indicated by DBReadLatency metrics. Key takeaway: Use caching (ElastiCache) for repeated identical queries to reduce database load and improve performance.

Answer

The correct answer is: A