A smart home telemetry application stores real-time ambient device statuses in an Amazon DynamoDB table. Users retrieve the status of specific devices through a mobile app dashboard, which performs frequent key-value read requests by device ID. During peak usage hours, users experience high read latency, and the dashboard receives ProvisionedThroughputExceededException errors. CloudWatch metrics indicate that the table's total read capacity is not exceeded, but a small subset of highly active device IDs is causing hot partitions. The developer wants to deploy Amazon DynamoDB Accelerator (DAX) to resolve the latency and throttling issues. Which two actions must the developer take to achieve this objective?
- Deploy a DAX cluster and replace the standard DynamoDB client with the DAX client SDK in the application code.Answer
- Configure the read requests from the mobile application to use eventually consistent reads.Answer
- CModify the application code to perform Scan operations instead of GetItem operations to populate the cache.
- DIncrease the provisioned Read Capacity Units (RCUs) on the DynamoDB table to absorb the spikes in read traffic.
- EInitialize the DAX client in the application code by hardcoding the AWS IAM access keys and secret keys.
Answer
To resolve the throttling and latency issues using DAX, the developer must deploy the DAX cluster, use the DAX client SDK to point the application to the cache, and ensure read requests use eventually consistent reads so they can be cached.
To leverage DAX for sub-millisecond read latency and prevent hot partition throttling, the application must use the DAX client SDK to route reads through the cache. Additionally, the read operations must be configured as eventually consistent, because DAX does not cache strongly consistent reads in its Item Cache.
Step-by-Step Solution
Key Concept
Integrating DAX requires utilizing the DAX client SDK and configuring reads to be eventually consistent to leverage the DAX Item Cache.