DynamoDB is a managed NoSQL database. The main selling point is that developers won’t experience any operational overheads maintaining it.

Nevertheless, since it’s a proprietary database, the architecture is a real blackbox. AWS said that there are numerous differences from the Dynamo paper and every developer should strictly follows their documentations for the best practice.

One of the challeges in their documentation is to calculate and reserve the total numbers of RCUs/WCUs for tables.

Number of read capacity units (RCUs) – how many read requests can you send per second.

Number of write capacity units (WCUs) – how many write requests can you send per second.

WCUs

How to calcuate WCUs

WCUs Formula

Example of WCUs

Requirement: write 5 kb data per second

RCUs

There are 2 types of RCUs:

  1. Strong consistency (read slower becuase of quorums)
  2. Eventual consistency (read faster + cheaper price)

How to calcuate RCUs

RCUs Formula

Example of RCUs

Requirement: write 20 kb data per second

Note: In this post, I’m talking about reserved requests (provisioning). However, recently, there is a new pricing model, “On demand”, which literally is not what I mean in this context.