A logistics tracking application uses Amazon DynamoDB to store delivery status updates. During peak hours, the application frequently experiences read throttling ("ProvisionedThroughputExceededException") when querying the status of specific high-priority shipments, which are read repeatedly by multiple warehouse terminals using eventually consistent reads. The development team needs to implement a caching solution to reduce the load on the DynamoDB table and minimize tail latency while requiring minimal modifications to the existing application code. Which solution should the development team implement to meet these requirements?
- Deploy an Amazon DynamoDB Accelerator (DAX) cluster and update the application code to use the DAX SDK client instead of the standard DynamoDB client.Cevap
- BIncrease the table's provisioned Read Capacity Units (RCUs) and configure DynamoDB Auto Scaling to dynamically scale read capacity based on the spike in traffic.
- CDeploy an Amazon ElastiCache for Memcached cluster, and modify the application to perform a DynamoDB Scan operation with a FilterExpression to find the item on a cache miss, then populate the cache.
- DCreate an Amazon ElastiCache for Redis cluster, and update the backend Lambda function to establish a new Redis client connection on every single invocation to retrieve the item status.
Cevap
Deploy an Amazon DynamoDB Accelerator (DAX) cluster and update the application code to use the DAX SDK client instead of the standard DynamoDB client.
Deploying an Amazon DynamoDB Accelerator (DAX) cluster and updating the application code to use the DAX SDK client is the optimal solution. DAX provides a fully managed, API-compatible, in-memory cache for DynamoDB. Because the reads are eventually consistent, DAX caches and serves them directly from the item cache, eliminating hot partition read throttling on the underlying DynamoDB table with minimal changes to application logic.
Adım Adım Çözüm
Anahtar Kavram
Using DynamoDB Accelerator (DAX) to resolve read throttling on hot keys with minimal code changes.