0 votes
in AWS by

Your application is making requests to a DynamoDB table. Due to the certain surge of requests, you are now getting throttling errors in your application.

Which of the following can be used to resolve such errors? Choose 2 answers from the options given below.

1 Answer

0 votes
by

Answer - A and C.

Using exponential backoff in your requests can put some retries for your application to help with your surge of requests.

Alternatively, you can increase the throughput capacity defined for your table.

Option B is invalid because better use of partition keys could help.

Option D is invalid because this is used for having multiple copies of your table in additional regions.

For more information on API retries, please refer to the below URL-

https://docs.aws.amazon.com/general/latest/gr/api-retries.html

For more information on DynamoDB Throughput capacity, please refer to the below URL-

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ProvisionedThroughput.html

DynamoDB is a managed NoSQL database service provided by AWS, which is designed to provide high performance and scalability for read and write operations. When the throughput capacity of a table is exceeded, DynamoDB responds with throttling errors, indicating that the table is temporarily unable to handle additional requests. In order to resolve these errors, the following solutions can be considered:

A. Use exponential backoff in your requests from the application: Exponential backoff is a technique used to retry failed requests by increasing the delay between each retry, using an exponential function. This approach can help prevent overloading the DynamoDB table with too many requests at once, and reduce the likelihood of receiving throttling errors. The exponential backoff can be implemented in the application code to automatically retry requests after a delay, and gradually increase the delay if the requests continue to fail.

C. Change the throughput capacity on the tables: DynamoDB provides a way to increase the throughput capacity of a table by adjusting the provisioned read and write capacity units. Provisioned capacity can be increased by either increasing the number of read/write capacity units or by switching to on-demand capacity mode. Increasing the provisioned capacity will allow DynamoDB to handle more requests, reducing the likelihood of throttling errors.

B. Consider using multiple sort keys: In DynamoDB, data is organized into tables, which can have one or more indexes. Each index can have one partition key and one or more sort keys. Sort keys can be used to perform range queries, which can be useful when querying data in a table with a large number of items. By using multiple sort keys, you can distribute the query workload across multiple partitions, which can help reduce the likelihood of throttling errors.

D. Consider using global tables: Global tables can be used to replicate data across multiple regions, allowing users to access data with low latency from any region. This can help improve the performance of the application and reduce the likelihood of throttling errors.

In conclusion, A and C can be considered as possible solutions to resolve throttling errors in DynamoDB. Exponential backoff can be used to reduce the number of requests made to the table at once, while increasing the provisioned capacity will allow DynamoDB to handle more requests. Option B can also help to distribute query workload across multiple partitions, while option D can be used to replicate data across regions.

...