DEV Community

Cover image for AWS: Database Request Units
bob.ts
bob.ts

Posted on

2 1

AWS: Database Request Units

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.

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay