Published on

RCU & WCU of DynamoDB

Authors

Read capacity unit (RCU): • First you need to understand what is read request. 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.

EXAMPLE: To determine the number of RCUs required to handle 3 strongly consistent reads per/second with an average item size of 7KB, perform the following steps:

  1. Determine the average item size by rounding up the next multiple of 4KB (7KB rounds up to 8KB).
  2. Determine the RCU per item by dividing the item size by 4KB (8KB/4KB = 2).
  3. Multiply the value from step 2 with the number of reads required per second (2x3 = 6).

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.

EXAMPLE: To determine the number of WCUs required to handle 1 standard write per/second, simply multiply the average item size(7KB) by the number of writes required (7x1=7).