learn

RCU & WCU of DynamoDB

Learn DynamoDB read and write capacity units with examples.

Read capacity unit (RCU) — provisioned capacity mode

• 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 provisioned capacity mode, one RCU supports one strongly consistent read per second for an item up to 4 KB. • Larger items consume additional read capacity in 4 KB increments. • For provisioned capacity mode, one RCU supports two eventually consistent reads per second for an item up to 4 KB. • Transactional reads consume two RCUs for one read per second of an item 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 7 KB, 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) — provisioned capacity mode

• Each API call to write data to your table is a write request. • For provisioned capacity mode, one WCU supports one standard write per second for an item up to 1 KB. • Larger items consume additional write capacity in 1 KB increments. • Transactional writes consume two WCUs for one write per second of an item 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: For one standard write per second of an average 7 KB item, the item size is charged in 1 KB increments, so the requirement is 7 WCUs.

Learning checkpoint

Mark this guide complete to include it in your local Engineering Journey.

Knowledge path

Connected concepts

Explore the knowledge graph

WATCH WITH THIS TOPIC