AWS DynamoDB Read Capacity Units (RCU) for Optimal Performance

RCU Suitable Situations for a DynamoDB Table with RCU of 1

Prev Question Next Question

Question

A DynamoDB table is set to have a read capacity unit (RCU) of 1

Which of the following situations is the RCU suitable for?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: B.

As per the documentation,

"One read request unit represents one strongly consistent read request, or two eventually consistent read requests, for an item up to 4 KB in size.

Two read request units represent one transactional read for items up to 4 KB."

Option A is incorrect because it should be one strongly consistent read.

Option B is CORRECT because 1 RCU represents two eventually consistent reads of 4KB data.

Option C is incorrect because, for three strongly consistent reads of 4KB data, RCU needs to be three.

Option D is incorrect because two transactional reads of 4KB data need the RCU to be 4(2x2) according to the above reference.

Please refer to the below link for DynamoDB read (strongly consistent and eventually consistent) and write requests.

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

DynamoDB is a NoSQL database service provided by Amazon Web Services (AWS) that offers fast and flexible NoSQL database solutions. DynamoDB has two capacity modes: provisioned and on-demand. In the provisioned capacity mode, the user needs to specify the read and write capacity units (RCUs and WCUs) required for their table.

An RCU is the capacity that enables reading one item per second, where the size of the item is up to 4 KB in size.

In this question, the DynamoDB table is set to have an RCU of 1. Let's analyze each option:

A. For two strongly consistent read of 4KB data. In strongly consistent read, the read operation returns a result that reflects all writes that received a successful response before the read. In other words, the read operation is guaranteed to return the most recent version of the data. Each strongly consistent read requires one RCU. Therefore, two strongly consistent reads of 4KB data require two RCUs, which is greater than the provisioned RCU of 1. Therefore, Option A is not suitable.

B. For two eventually consistent read of 4KB data. In eventually consistent read, the read operation might not reflect the latest version of the data, as it returns a result that is a composite of all writes that were made before the read, plus some fraction of writes that were made after the read. The fraction of such writes is determined by the consistency level. Eventually consistent reads require half the RCU needed for strongly consistent reads. Therefore, two eventually consistent reads of 4KB data require one RCU, which is equal to the provisioned RCU of 1. Therefore, Option B is suitable.

C. For three strongly consistent read of 4KB data. Each strongly consistent read requires one RCU. Therefore, three strongly consistent reads of 4KB data require three RCUs, which is greater than the provisioned RCU of 1. Therefore, Option C is not suitable.

D. For two transactional read of 4KB data. Transactional read is a type of strongly consistent read that is used in transactional requests. In transactional requests, the read operation returns a result that reflects all writes that received a successful response before the read, plus any writes made by the same transaction that are not yet committed. Each transactional read requires two RCUs. Therefore, two transactional reads of 4KB data require four RCUs, which is greater than the provisioned RCU of 1. Therefore, Option D is not suitable.

In conclusion, the suitable option is Option B, which is for two eventually consistent reads of 4KB data.