A developer is optimizing a reporting service that retrieves product catalog listings from an Amazon DynamoDB table. The service frequently executes the same Query operations to retrieve items by category. To reduce latency, the developer deploys an Amazon DynamoDB Accelerator (DAX) cluster and updates the application code to use the DAX SDK client. While individual GetItem operations now exhibit sub-millisecond latency, the Query operations continue to experience high latency and consume the table's Provisioned Throughput. Which modification should the developer make to ensure the Query operations are successfully cached by DAX?
- Configure the Query operations in the application code to perform eventually consistent reads by setting the ConsistentRead parameter to false.Cevap
- BReplace the Query operations in the application code with Scan operations to allow the results to be cached within the DAX item cache.
- CIncrease the Provisioned Read Capacity Units (RCUs) of the DynamoDB table to prevent DAX from bypassing the cache when query volumes spike.
- DInitialize the DAX SDK client by hardcoding the access key and secret key of an IAM user that has DynamoDB read permissions.
Cevap
Configure the Query operations in the application code to perform eventually consistent reads by setting the ConsistentRead parameter to false.
DAX does not cache strongly consistent reads (such as Query or Scan operations where ConsistentRead is set to true). These requests are passed through directly to the underlying DynamoDB table. To utilize the DAX query cache, the developer must configure the client to perform eventually consistent reads by setting ConsistentRead to false.
Adım Adım Çözüm
Anahtar Kavram
DAX Query Cache Consistency Requirements