1

Let's say I have:

  • A table with 100 RCUs
  • This table has 200 items
  • Each item has 4kb

As far as I understand, RCU are calculated per second and you spend 1 full RCU per 4kb (with a strongly consistent read).

1) Because of this, if I spend more than 100 RCU in one second I should get an throttling error, right?

2) How can I predict that a certain request will require more than my provisioned througput? It feels scary that at any time I can compromise the whole database by making a expensive request.

3) Let's say I want to do a scan on the whole table (get all items), so that should require 200 RCUS, But that will depend on how fast dynamodb does it right? If its too fast it will give me an error, but if it takes 2 seconds or more it should be fine, how do I account for this? How to take in account DynamoDB speed to know how much RCUs I will need? What it DynamoDB "speed"?

4) What's the difference between throttling and throughput limit exceeded?

Mojimi
  • 2,561
  • 9
  • 52
  • 116

1 Answers1

2

Most of your questions are theoretical at this point , because you now (as of Nov 2018) have the option of simply telling dynamodbv to use 'on demand' mode where you no longer need to calculate or worry about RCU's. Simply enable this option, and forget about it. I had similar problems in the past because of very uneven workloads - periods of no activity and then periods where I needed to do full table scans to generate a report - and struggled to get it all working seemlessly.

I turned on 'on demand' mode, cost went down by about 70% in my case, and no more throttling errors. Your cost profile may be different, but I would defintely check out this new option.

https://aws.amazon.com/blogs/aws/amazon-dynamodb-on-demand-no-capacity-planning-and-pay-per-request-pricing/

E.J. Brennan
  • 45,870
  • 7
  • 88
  • 116
  • 2
    Yes I'm fully aware of on demand mode, but it is scary as you can't set a limit and I fear some malicious user could end increasing our monthly bill. – Mojimi Jul 03 '19 at 19:09