DOP-C02 · Question #41
You are creating a new API for video game scores. Reads are 100 times more common than writes, and the top 1% of scores are read 100 times more frequently than the rest of the scores. What's the…
The correct answer is D. DynamoDB table with roughly equal read and write throughput, with ElastiCache caching. Because the 100x read ratio is mostly driven by a small subset, with caching, only a roughly equal number of reads to writes will miss the cache, since the supermajority will hit the top 1% scores. Knowing we need to set the values roughly equal when using caching, we select…
Question
You are creating a new API for video game scores. Reads are 100 times more common than writes, and the top 1% of scores are read 100 times more frequently than the rest of the scores. What's the best design for this system, using DynamoDB?
Options
- ADynamoDB table with 100x higher read than write throughput, with CloudFront caching.
- BDynamoDB table with roughly equal read and write throughput, with CloudFront caching.
- CDynamoDB table with 100x higher read than write throughput, with ElastiCache caching.
- DDynamoDB table with roughly equal read and write throughput, with ElastiCache caching.
How the community answered
(32 responses)- A9% (3)
- B3% (1)
- C22% (7)
- D66% (21)
Explanation
Because the 100x read ratio is mostly driven by a small subset, with caching, only a roughly equal number of reads to writes will miss the cache, since the supermajority will hit the top 1% scores. Knowing we need to set the values roughly equal when using caching, we select AWS ElastiCache, because CloudFront cannot directly cache DynamoDB queries, and ElastiCache is an excellent in-memory cache for database queries, rather than a distributed proxy cache for content delivery. ... One solution would be to cache these reads at the application layer. Caching is a technique that is used in many high-throughput applications, offloading read activity on hot items to the cache rather than to the database. Your application can cache the most popular items in memory, or use a product such as ElastiCache to do the same. GuidelinesForTables.CachePopularItem
Topics
Community Discussion
No community discussion yet for this question.