Dynamo DB Throttling

I have a dynamo table with 5 readable and 5 writeable files. In this table, I had two entries.

Then I decided to see what kind of response to the error I would get by clicking on a large number of records at once (approximately 4000 records in one package). The blue “consumed” line was directed directly above the red “capacity”, however I did not receive any error messages.

The indicators show that throttling is occurring, but my reads are still happening, and my records are still happening if I go over the capacitance levels.

I spent more than 30 minutes reading and writing much higher than capacity, without errors.

I'm not sure if this is because I am using the official javascript SDK in node js, which maybe transparently handles throttling and repeats running requests?

I hope someone can give me some advice on this.

thanks

+5
source share
2 answers

Just wanted to add a throttle notification to @Luc Hendriks answer

Even after you do not enter the “packet capacity” and DynamoDb starts throttling, you will get a ProvisionedThroughputExceededException relatively rarely (according to my experience). This is because the SDK silently repeats running queries (so you were right, the SDK transparently handles throttling).

You can use the maxRetries parameter to turn off automatic retries, so you get a ProvisionedThroughputExceededException right after you see throttling in metrics.

Here is an example of how to execute an update request without automatically retrying:

var aws_dynamodb = new aws.DynamoDB({maxRetries: 0}), aws_dynamodb_doc = new aws.DynamoDB.DocumentClient({service: aws_dynamodb}); // ... aws_dynamodb_doc.update(params, function(err, data) { // ... }); 
+2
source

This is due to the capacity of the package. Read more about this in the AWS docs: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GuidelinesForTables.html#GuidelinesForTables.Bursting

This basically means that you can have up to 300 seconds of storage capacity and use it as a pool when you have a surge in load. In your case, it will be a pool of 1,500 requests that you can use instantly, and will be filled again when the capacity is not in use.

+1
source

Source: https://habr.com/ru/post/1247318/


All Articles