Question

Difficulty: MediumOptimizing Performance with Caching and DAX

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?

  1. Deploy a DAX cluster and replace the standard DynamoDB client with the DAX client SDK in the application code.Answer
  2. Configure the read requests from the mobile application to use eventually consistent reads.Answer
  3. C
    Modify the application code to perform Scan operations instead of GetItem operations to populate the cache.
  4. D
    Increase the provisioned Read Capacity Units (RCUs) on the DynamoDB table to absorb the spikes in read traffic.
  5. E
    Initialize 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

1
Replace the standard DynamoDB client SDK with the DAX client SDK.
The application routes its API calls to the DAX cluster instead of directly to DynamoDB.
DAX requires a specialized client SDK that is API-compatible with DynamoDB to intercept and cache the requests.
2
Configure read requests to use eventually consistent reads.
DAX intercepts the GetItem and Query calls and saves the result in the Item Cache.
Strongly consistent reads bypass the DAX cache and hit the database directly, which would not resolve the hot partition throttling.

Key Concept

Integrating DAX requires utilizing the DAX client SDK and configuring reads to be eventually consistent to leverage the DAX Item Cache.
Rate this question