With provisioned capacity mode, you specify the number of data reads and writes per second that you require for your application.
Read capacity unit (RCU):
• Each API call to read data from your table is a read request.
• Read requests can be strongly consistent, eventually consistent, or transactional.
• For items up to 4 KB in size, one RCU can perform one strongly consistent read request per second.
• Items larger than 4 KB require additional RCUs.
• For items up to 4 KB in size, one RCU can perform two eventually consistent read requests per second.
• Transactional read requests require two RCUs to perform one read per second for items up to 4 KB.
• For example, a strongly consistent read of an 8 KB item would require two RCUs, an eventually consistent read of an 8 KB item would require one RCU, and a transactional read of an 8 KB item would require four RCUs.
Write capacity unit (WCU):
• Each API call to write data to your table is a write request.
• For items up to 1 KB in size, one WCU can perform one standard write request per second.
• Items larger than 1 KB require additional WCUs.
• Transactional write requests require two WCUs to perform one write per second for items up to 1 KB.
• For example, a standard write request of a 1 KB item would require one WCU, a standard write request of a 3 KB item would require three WCUs, and a transactional write request of a 3 KB item would require six WCUs.
To determine the number of RCUs required to handle 20 eventually consistent reads per/second with an average item size of 4.5KB, perform the following steps:
1. Determine the average item size by rounding up the next multiple of 4KB (4.5KB rounds up to 8KB).
2. Determine the RCU per item by dividing the item size by 8KB (8KB/8KB = 1).
3. Multiply the value from step 2 with the number of reads required per second (1x20 = 20).
To determine the number of WCUs required to handle 12 standard writes per/second with an average item size of 8KB, simply multiply the average item size by the number of writes required (5x12=60).
CORRECT: "20 RCU and 60 WCU" is the correct answer.
INCORRECT: "40 RCU and 60 WCU" is incorrect. This would be the correct answer for strongly consistent reads and standard writes.
INCORRECT: "40 RCU and 120 WCU" is incorrect. This would be the correct answer for strongly consistent reads and transactional writes.
INCORRECT: "6 RCU and 18 WCU" is incorrect.
References:
https://aws.amazon.com/dynamodb/pricing/provisioned/
Save time with our AWS cheat sheets:
https://digitalcloud.training/amazon-dynamodb/