DVA-C02 practice question 27 of 35

A developer has built an application that inserts data into an Amazon DynamoDB table. The table is configured to use provisioned capacity. The…

Full set: 598 questions

Domain Security

A developer has built an application that inserts data into an Amazon DynamoDB table. The table is configured to use provisioned capacity. The application is deployed on a burstable nano Amazon EC2 instance. The application logs show that the application has been failing because of a ProvisionedThroughputExceededException error. Which actions should the developer take to resolve this issue? (Select TWO.)
Answer options
A: Move the application to a larger EC2 instance.
B: Increase the number of read capacity units (RCUs) that are provisioned for the DynamoDB table.
C: Reduce the frequency of requests to DynamoDB by implementing exponential backoff. Correct answer
D: Increase the frequency of requests to DynamoDB by decreasing the retry delay.
E: Change the capacity mode of the DynamoDB table from provisioned to on-demand. Correct answer
Correct Answer:
C. Reduce the frequency of requests to DynamoDB by implementing exponential backoff.; E. Change the capacity mode of the DynamoDB table from provisioned to on-demand.
Explanation

The ProvisionedThroughputExceededException error indicates that the application's request rate for write operations (inserts) is higher than the Write Capacity Units (WCUs) provisioned for the DynamoDB table. To resolve this, the developer can take two approaches. First, on the client-side, implementing an error handling strategy like exponential backoff (C) will reduce the request frequency by introducing progressively longer delays between retries. This smooths out traffic bursts and prevents overwhelming the table's capacity. Second, on the service-side, changing the table's capacity mode from provisioned to on-demand (E) allows DynamoDB to automatically manage the throughput capacity. It instantly accommodates the application's workload as it ramps up or down, eliminating throttling due to insufficient provisioned capacity.

Why Incorrect

A. The error originates from DynamoDB, not the EC2 instance. The instance is successfully sending the requests; the database is rejecting them. A larger instance will not solve the database capacity issue.
B. The application is inserting data, which consumes Write Capacity Units (WCUs). Increasing Read Capacity Units (RCUs) will not affect the table's write throughput and will not resolve the error.
D. Increasing the request frequency by decreasing the retry delay would exacerbate the throttling problem, leading to more ProvisionedThroughputExceededException errors, not fewer.

References

1. AWS DynamoDB Developer Guide, "Troubleshooting throttling issues in Amazon DynamoDB": This document explicitly states, "If you receive ProvisionedThroughputExceededException... you can increase the provisioned throughput for the table... Another option is to use on-demand capacity mode... The AWS SDKs have a default retry policy that includes exponential backoff." This supports options C and E.

2. AWS DynamoDB Developer Guide, "Read/write capacity mode": This guide details the two capacity modes. It explains that "On-demand mode is a good option if... You have unpredictable application traffic." This directly addresses the scenario where provisioned capacity is being exceeded, making option E a valid solution.

3. AWS SDKs and Tools Reference Guide, "Error retries and exponential backoff": This guide describes the standard mechanism for handling transient errors from AWS services. It states, "These are techniques that attempt to retry an operation after a certain amount of time, with an exponentially increasing wait time between retries... to improve the chances of a successful response." This validates option C as a best practice.

Scroll to Top