0 votes
in AWS by

An application is being developed that is going to write data to a DynamoDB table. You have to set up the read and write throughput for the table.  Data is going to be read at the rate of 300 items every 30 seconds. Each item is of size 6KB.

The reads can be eventual consistent reads.

What would be the Read Capacity Unit that needs to be set on the table?

1 Answer

0 votes
by

Answer - A.

Since there are 300 items read every 30 seconds, that means there are (300/30) = 10 items read every second.

Since each item is 6KB in size, that means 2 reads will be required for each item.

The question specified "eventual consistent reads" which means we need to divide by 2 since 1 RCU has two eventually consistent reads.

So we have a total of 2*(10 / 2) = 2*5= 10 reads for the number of items per second.

For more information on Read and Write capacity, please refer to the below link-

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ProvisionedThroughput.html

To calculate the read capacity units required for DynamoDB, we need to consider the following factors:

  1. Item size: In this case, each item is 6KB in size.

  2. Read consistency: The question states that eventual consistent reads are acceptable. Eventual consistent reads are less demanding on throughput than strongly consistent reads.

  3. Read frequency: The question states that 300 items will be read every 30 seconds.

With these factors in mind, we can use the following formula to calculate the required read capacity units:

Read Capacity Units = (Item size / 4 KB) x (Reads per second) x (Read Consistency)

Here, the item size is 6 KB, which is greater than the 4 KB base item size that DynamoDB uses for calculating throughput. So we need to round it up to the nearest multiple of 4 KB, which is 8 KB.

Using this value, we can calculate the read capacity units as follows:

Read Capacity Units = (8 KB / 4 KB) x (300 / 30) x (0.5) = 4 x 10 x 0.5 = 20

Therefore, the correct answer is B. 20. We need to set the read capacity units to 20 for the DynamoDB table to handle the given read workload.

...