AWS Database Request Units are one area that I always have to refer back to. I wrote this reference to make sure I understand the math needed.
HERE is the Amazon DynamoDB documentation.
I opted to write this article, more as a cheatsheet or reference and tried to put together enough detail to deepen and solidify my understanding of these calculations.
Key Terms
Unit | Definition |
---|---|
Write Capacity Units (WCU) | Each API call to write data to a table is a write request. |
Read Capacity Units (RCU) | Each API call to read data from a table is a read request. Read requests can be strongly consistent, eventually consistent, or transactional. |
Write Calculations
- WR/s = Write Requests per Second.
Type | WR/x | at | Size | = | WCU |
---|---|---|---|---|---|
Standard | 1 WR/s | at | 1 KB | = | 1 WCU |
Transactional | 1 WR/s | at | 1 KB | = | 2 WCUs |
Write Examples
Write Type | Calculation | WCUs Needed |
---|---|---|
Standard | 1 WR/x handles a 1 KB Item | with 1 WCU |
Standard | 1 WR/s handles a 3 KB Item | with 3 WCUs |
Transactional | 1 WR/s handles a 3 KB Item | with 6 WCUs |
Read Calculations
- RR/s = Read Requests per Second.
Type | RR/s | at | Size | = | WCU |
---|---|---|---|---|---|
Strongly Consistent | 1 RR/s | at | 4 KB | = | 1 RCU |
Eventually Consistent | 2 RR/s | at | 4 KB | = | 1 RCU |
Transactional | 1 RR/s | at | 4 KB | = | 2 RCUs |
Read Examples
Read Type | Calculation | RCUs Needed |
---|---|---|
Strongly Consistent | 1 RR/s handles an 8 KB Item | with 2 RCUs |
Eventually Consistent | 2 RR/s handles an 8 KB Item | with 1 RCU |
Transactional | 1 RR/s handles an 8 KB Item | with 4 RCUs |
More Examples
5 KB Item ...
- 1 RCU for Eventually Consistent Read (handles 8 KB).
- 2 RCU for Strongly Consistent Read (handles 8 KB).
- 5 WCU for Standard Write.
- 10 WCU for Transactional Write.
10 KB Item ...
- 2 RCU for Eventually Consistent Read (handles 16 KB).
- 3 RCU for Strongly Consistent Read (handles 12 KB).
- 10 WCU for Standard Write.
- 20 WCU for Transactional Write.
13 KB Item ...
- 2 RCU for Eventually Consistent Read (handles 16 KB).
- 4 RCU for Strongly Consistent Read (handles 16 KB).
- 13 WCU for Standard Write.
- 26 WCU for Transactional Write.
I hope you found this information useful.
Top comments (0)