Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

DynamoDb provisioned capacity, high batch get volume

How should one calculate the read unit capacity for DynamoDb? Here is the use case:

API that needs to retrieve 1000 – 10,000 records per request. No relational processing, simply key based. <1000 requests are expected per day, however, latency is important. So DynamoDb configuration needs to retrieve 10,000 records in < 1 second.

Each record has 5 string attributes, with keys of length 6 and values of length 8 (ex {'pk_123': 'abcdefgh', ...})

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Naively, my guess is 1k min, 10k max read unit capacity w/ autoscaling on and target utilization at 70%.

>Solution :

A simple calculation would be the following

10000rps / 4kb / 2(eventually consistent) = 1250

So if you’re consistent throughput is 10k RPS then 1250 RCU is what you’ll consume.

Setting a min will depend on how often you ramp down and how sharp its required to ramp up. If you have steady traffic always above 1k, then a good base would be 1k. However, if you have long periods of no traffic, it could be wasteful.

One thing I always ask people to do is to use on-demand for a short period, and then you can make much better decisions knowing your access patterns and throughput consumption.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading