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 4 strongly consistent reads per/second with an average item size of 9KB, perform the following steps:
1. Determine the average item size by rounding up the next multiple of 4KB (9KB rounds up to 12KB).
2. Determine the RCU per item by dividing the item size by 4KB (12KB/4KB = 3).
3. Multiply the value from step 2 with the number of reads required per second (3x4 = 12).
To determine the number of WCUs required to handle 2 standard writes per/second with an average item size of 9KB, simply multiply the average item size by the number of writes required (9x2=18).
CORRECT: "12 RCU and 18 WCU" is the correct answer.
INCORRECT: "24 RCU and 18 WCU" is incorrect. This would be the correct answer for transactional reads and standard writes.
INCORRECT: "12 RCU and 36 WCU" is incorrect. This would be the correct answer for strongly consistent reads and transactional writes.
INCORRECT: "6 RCU and 18 WCU" is incorrect. This would be the correct answer for eventually consistent reads and standard writes
References:
https://aws.amazon.com/dynamodb/pricing/provisioned/
Save time with our AWS cheat sheets:
https://digitalcloud.training/amazon-dynamodb/