AWS Certified Database - Specialty: Provisioned WCU Calculation for DynamoDB Table

Provisioned WCU Calculation for DynamoDB Table

Question

An application uses a DynamoDB table to store data with each record being 6KB in size.

The application needs to perform 100 eventually consistent read operations per second and 40 write operations per second.

What is the provisioned WCU value required to meet these requirements?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer: B.

Option B is CORRECT.

One write capacity unit is equivalent to one write per second for an item up to 1 KB in size.

Thus, the required WCU in this scenario is 6KB x 40 write operations per second = 240 WCU.

Reference:

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

To determine the provisioned WCU value required to meet the read and write requirements of the application, we need to consider the following:

  • Read Capacity Units (RCUs): One RCU can read one item of size up to 4 KB per second in eventual consistency mode. For strongly consistent reads, one RCU can read one item of size up to 4 KB per second. For items larger than 4 KB, additional RCUs are required for each 4 KB of data.
  • Write Capacity Units (WCUs): One WCU can write one item of size up to 1 KB per second. For items larger than 1 KB, additional WCUs are required for each additional KB of data.

Given that each item in the table is 6 KB in size, we need to calculate the number of RCUs and WCUs required to meet the application's needs:

  • For the 100 eventually consistent read operations per second, we need 100 RCUs. Since each item is 6 KB in size, we need to divide the item size by 4 KB (the size that one RCU can read in eventual consistency mode) and round up to the nearest integer: 6 KB / 4 KB = 1.5, rounded up to 2 RCUs per item. Therefore, the total RCUs required are: 100 * 2 = 200 RCUs.
  • For the 40 write operations per second, we need 40 WCUs. Since each item is 6 KB in size, we need to divide the item size by 1 KB (the size that one WCU can write) and round up to the nearest integer: 6 KB / 1 KB = 6 WCUs per item. Therefore, the total WCUs required are: 40 * 6 = 240 WCUs.

Therefore, the provisioned WCU value required to meet these requirements is 240 WCUs, which corresponds to answer B.