DynamoDB Throttling

Question:

I have a dynamo table with 5 read and 5 write capacity. In this table I had two records.

I then decided to see what kind of error response I would get by pushing a large number of writes through at once (roughly 4000 records in one burst). The blue ‘consumed’ line shot straight over the red ‘capacity’ line however I got no error message of any kind.

The metrics show throttling taking place but my reads still occur and my writes still occur if I go over both capacity levels.

I have spent over 30 minutes pushing the read and writes well above capacity, with no error yet.

I’m not sure if this is because I am using the official javascript SDK in node js, which maybe transparently handles throttling and retries the throttled queries?

I’m hoping somebody can give me some guidance on this.

Thanks

Answer:

Just wanted to add a notice about throttling to the answer by @Luc Hendriks

Even after you are out of ‘burst capacity’ and DynamoDb starts throttling, you will get ProvisionedThroughputExceededException relatively rarely (as per my experience). This is because SDK silently retries throttled requests (so you were right, SDK transparently handles throttling).

You can use maxRetries parameter to disable automatic retries, so that you will get ProvisionedThroughputExceededException right after you see throttling in metrics.

Here is an example how to perform an update request without automatic retries:

Leave a Reply