DynamoDB Design for Video Game Scores API

Best Design for Video Game Scores API using DynamoDB

Prev Question Next Question

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?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct answer is.

D.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 super majority will hit the top 1% scores.

Knowing we need to set the values roughly equal when using caching, we select AWS DAX (DynamoDB Accelerator)

For more information on DynamoDB table gudelines please refer to the below link :

http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GuidelinesForTables.html

Option C is not correct, because this does not offer an optimized solution.

The question asks for a "best design" which includes a cost-optimized design too.

+ Aad inex

Readiwrite capacity mode

‘Select on-demand you want to pay only forthe read and wes you perfor, wth no capacty planing requred, Select provisioned fo save on throughput costs fu can rekably estimate
‘your appicaton's irougnput equrements. See the DynamoDB pricing page and DynameD8 Developer Guide to leam more

Readiwite capacity mode can be changed later.

(© Provsioned (teeter egibe)
(on-demand

Provisioned capacity

Read capactyunts re capacty unts
rae (SENS 6

Estimated cost_ $2.91 /month (Capacity calculator)

‘Auto Scaling
1 Read capacty wate capacny
T Sane setngs os ead
Targetumeaton [70] % a )%
tainmum prowsoneacapacty [5 | unts 5 | ums
‘Maximum powsionedcapacty | 49000 | unts noon | wats
 Appy same segs o gota! 1 bopty same setings to gba!

‘secondary indexes ‘secondary indexes

The correct answer is C. DynamoDB table with 100x higher read than write throughput, with ElastiCache caching.

Explanation:

In this scenario, we are dealing with an API for video game scores, where reads are much more frequent than writes, and the top 1% of scores are read 100 times more frequently than the rest of the scores. This means that we need a solution that can handle a high volume of read requests efficiently and can handle the top 1% of scores in a performant manner.

DynamoDB is a great choice for this use case since it provides fast and scalable NoSQL database capabilities, allowing us to handle a large volume of requests with high throughput and low latency. However, we need to choose the best configuration to optimize the performance of the API.

Option A suggests a DynamoDB table with 100x higher read than write throughput, with CloudFront caching. This option does not take into account the fact that the top 1% of scores are read 100 times more frequently than the rest of the scores. CloudFront caching may help with reducing the load on the DynamoDB table, but it does not address the performance issue with the top 1% of scores.

Option B suggests a DynamoDB table with roughly equal read and write throughput, with CloudFront caching. This option is not optimal since it does not take into account the fact that reads are much more common than writes.

Option D suggests a DynamoDB table with roughly equal read and write throughput, with DAX caching. DAX caching can help improve the performance of the API, but it does not address the performance issue with the top 1% of scores.

Option C suggests a DynamoDB table with 100x higher read than write throughput, with ElastiCache caching. This option is the best choice since it takes into account the high volume of read requests and the performance issue with the top 1% of scores. With ElastiCache caching, we can cache the top 1% of scores in memory, reducing the load on the DynamoDB table and improving the performance of the API.

In summary, the best design for this system, using DynamoDB, is to use a DynamoDB table with 100x higher read than write throughput, with ElastiCache caching.