DVA-C02 · Question #250
A company has a three-tier application that is deployed in Amazon Elastic Container Service (Amazon ECS). The application is using an Amazon RDS for MySQL DB instance. The application performs more da
The correct answer is A. Use Amazon ElastiCache to cache query results.. ElastiCache reduces RDS ReadLatency by caching frequently accessed query results in memory, preventing repeated reads from hitting the database during peak traffic.
Question
A company has a three-tier application that is deployed in Amazon Elastic Container Service (Amazon ECS). The application is using an Amazon RDS for MySQL DB instance. The application performs more database reads than writes. During times of peak usage, the application's performance degrades. When this performance degradation occurs, the DB instance's ReadLatency metric in Amazon CloudWatch increases suddenly. How should a developer modify the application to improve performance?
Options
- AUse Amazon ElastiCache to cache query results.
- BScale the ECS cluster to contain more ECS instances.
- CAdd read capacity units (RCUs) to the DB instance.
- DModify the ECS task definition to increase the task memory.
How the community answered
(53 responses)- A72% (38)
- B8% (4)
- C4% (2)
- D17% (9)
Why each option
ElastiCache reduces RDS ReadLatency by caching frequently accessed query results in memory, preventing repeated reads from hitting the database during peak traffic.
Amazon ElastiCache (Redis or Memcached) acts as an in-memory caching layer in front of RDS. By caching the results of common read queries, the application can serve repeated requests directly from cache, dramatically reducing the number of queries reaching the RDS instance and eliminating the ReadLatency spikes observed during peak usage.
Scaling ECS instances increases application-tier compute capacity but does not reduce the load or latency on the RDS database itself.
Read Capacity Units (RCUs) are a DynamoDB concept and do not apply to Amazon RDS for MySQL.
Increasing ECS task memory improves application-level memory availability but has no effect on database read latency.
Concept tested: ElastiCache for RDS read performance optimization
Source: https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/elasticache-use-cases.html
Community Discussion
No community discussion yet for this question.