DynamoDB Scaling and Performance Best Practices

How to Avoid Throttling and Bottlenecks in DynamoDB

Prev Question Next Question

Question

You are managing the development of an application that uses DynamoDB to store JSON data.

You have already set the Read and Write capacity of the DynamoDB table.

You are unsure of the amount of the traffic that will be received by the application during the deployment time.

How can you ensure that the DynamoDB is not highly throttled and does not become a bottleneck for the application? Choose 2 answers from the options below.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A and C.

Refer to the following AWS Documentation that specifies what should be monitored for a DynamoDB table.

For more information on monitoring DynamoDB please see the below link:

http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/monitoring-cloudwatch.html
How can I
determine how
much of my
provisioned
throughput is
being used?

You can monitor ConsumedReadCapacityUnits or
Consumedi?riteCapacityUnits over the specified time period, to
track how much of your provisioned throughput is being used.

When managing an application that uses DynamoDB to store JSON data, it is important to ensure that the DynamoDB table is not highly throttled and does not become a bottleneck for the application. This can be achieved by taking the following steps:

  1. Monitor the ConsumedReadCapacityUnits and ConsumedWriteCapacityUnits metrics using Cloudwatch: The ConsumedReadCapacityUnits and ConsumedWriteCapacityUnits metrics are important indicators of how much capacity is being used by the DynamoDB table. By monitoring these metrics using Cloudwatch, you can determine if the table is approaching its maximum capacity and needs to be scaled up to avoid being throttled. If you notice that the ConsumedReadCapacityUnits or ConsumedWriteCapacityUnits metrics are consistently high, it may be necessary to increase the Read and Write capacity of the DynamoDB table.

  2. Create a Cloudwatch alarm which would then send a trigger to AWS Lambda to increase the Read and Write capacity of the DynamoDB table: If you anticipate that the application will receive a high amount of traffic during deployment, you can create a Cloudwatch alarm that will trigger AWS Lambda to increase the Read and Write capacity of the DynamoDB table when the ConsumedReadCapacityUnits and ConsumedWriteCapacityUnits metrics reach a certain threshold. This will help ensure that the DynamoDB table can handle the increased traffic without being throttled.

Option B, Monitor the SystemErrors metric using Cloudwatch, is not a relevant metric to monitor in this scenario because it does not provide any information about the capacity of the DynamoDB table.

Option D, Create a Cloudwatch alarm which would then send a trigger to AWS Lambda to create a new DynamoDB table, is not a recommended solution in this scenario because creating a new DynamoDB table will not solve the issue of the existing table being throttled. Instead, it is better to increase the capacity of the existing table to handle the increased traffic.