AWS Certified Developer Associate DVA-C02 Practice Question
Your team's e-commerce application, hosted on AWS, frequently encounters performance bottlenecks during flash sales, leading to exceptions when processing payments. These exceptions are often due to database write limits being exceeded. To mitigate the issue, you've been asked to refine the application's interaction with the database. What pattern should you employ to address the limitation errors in your application logic?
You selected this option
Continuously attempt to resend the failed transactions at a fixed interval until they are processed without any exceptions.
You selected this option
Ignore the exceptions from the database and assume that the transactions will be processed eventually without any additional logic.
You selected this option
Automatically switch the database to on-demand capacity mode within the application logic when exceptions are caught.
You selected this option
Dynamically adjust the provisioned capacity of the database immediately in the code based on the exceptions received.
You selected this option
Employ a retry mechanism that introduces increasing delays between attempts, along with random variation in timing (exponential backoff and jitter).
Implementing retries with exponential backoff is the correct strategy for dealing with exceeded throughput limits in a database like DynamoDB. When a ProvisionedThroughputExceededException occurs, it means the allowed capacity has been temporarily exceeded. To handle this, the application should implement a delay before trying the same request again. The delay should gradually increase with each attempt (exponential backoff), and ideally, there should be a variation in the retry intervals (jitter) to prevent synchronized retries from different instances, which could continue to overwhelm the database. This pattern helps to distribute the load more evenly and increases the likelihood of successful requests without continuously hitting the throughput limit. Directly retrying without any delay or backoff will likely result in repeated exceptions because the database throughput may not have had the chance to recover. Increasing the provisioned throughput immediately is a reactive measure that does not solve the immediate problem and may lead to higher costs, while the application cannot automatically switch a table to on-demand capacity in response to exceptions.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is exponential backoff and how does it work?
Open an interactive chat with Bash
What is the role of jitter in a retry mechanism?
Open an interactive chat with Bash
What is a ProvisionedThroughputExceededException, and how can it affect my application?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Development with AWS Services
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Oh snap!
Loading...
Loading...
Loading...
Information Technology Package Join Premium for Full Access