Question #1491
A real-time gaming application uses Amazon DynamoDB to store player scores. Players expect the leaderboard to update with minimal delay after each game. The development team needs an optimal solution that requires the least amount of application code changes. Which approach should they implement?
Configure Amazon DynamoDB Accelerator (DAX) for the scores table. Update the code to use the DAX endpoint.
Enable DynamoDB global tables to distribute read traffic across regions. Update the application to read from the nearest region.
Double the number of read capacity units for the scores table in DynamoDB. Continue to use the existing DynamoDB endpoint.
Deploy an Amazon ElastiCache for Memcached cluster. Update the application to query the cache before accessing DynamoDB.
Explanation
Answer A is correct because Amazon DynamoDB Accelerator (DAX) is designed to reduce read latency by caching frequently accessed data. Updating the application to use the DAX endpoint requires minimal code changes, as DAX is fully compatible with DynamoDB API calls. This ensures real-time leaderboard updates with low latency.
Option B (Global Tables) focuses on multi-region replication, which is unnecessary here since the question does not mention cross-region requirements. Option C (increasing read capacity) may improve throughput but does not directly address latency reduction. Option D (ElastiCache) requires significant code changes to implement caching logic, unlike DAX, which integrates seamlessly.
Key Points:
- DAX reduces read latency via in-memory caching.
- Minimal code changes: only the endpoint needs updating.
- Other options either add complexity (D), address unrelated issues (B), or are less effective (C).
Answer
The correct answer is: A