Soru

Zorluk: OrtaApplication Caching and Session State Management

A developer is building a high-traffic e-commerce application that stores product catalog data in an Amazon DynamoDB table. The application experiences frequent spikes in read requests for a few highly popular products, causing a ProvisionedThroughputExceededException even though the total read capacity of the table is within limits. The product details are read-intensive and updated infrequently. The developer wants to resolve the throttling issues and reduce read latency to sub-millisecond levels with minimal code changes. Which solution should the developer implement?

  1. Deploy an Amazon DynamoDB Accelerator (DAX) cluster and update the application to use the DAX SDK client.Cevap
  2. B
    Scale up the provisioned Read Capacity Units (RCUs) on the DynamoDB table to accommodate the read spikes.
  3. C
    Deploy an Amazon ElastiCache for Memcached cluster and configure the application to perform a nightly DynamoDB Scan operation to load the products into the cache.
  4. D
    Store the product catalog details as parameters in AWS Systems Manager Parameter Store and enable Parameter Store caching.

Cevap

Deploy an Amazon DynamoDB Accelerator (DAX) cluster and update the application to use the DAX SDK client.
Deploying an Amazon DynamoDB Accelerator (DAX) cluster and updating the application to use the DAX SDK client is the correct solution. DAX provides seamless, API-compatible, sub-millisecond in-memory caching that intercepts requests to DynamoDB, protecting the table from hot key read spikes and avoiding ProvisionedThroughputExceededException errors without requiring changes to the core application query logic.

Adım Adım Çözüm

1
Identify the cause of the throttling.
Throttling is caused by hot partitions due to high-frequency reads on a small subset of popular items.
DynamoDB partitions data based on the partition key, and a high concentration of requests to specific keys can throttle those partitions even if the overall table capacity is not exceeded.
2
Compare caching options for DynamoDB.
DAX provides a write-through/read-through cache designed specifically for DynamoDB, whereas ElastiCache requires manual cache-aside logic.
Choosing DAX allows sub-millisecond read latency and prevents hot partition throttling with minimal code changes since DAX is API-compatible.
3
Select the correct SDK client.
Configure the application to initialize the DAX client instead of the default DynamoDB client.
This is the only code modification required to start routing queries through the cache.

Anahtar Kavram

Mitigating DynamoDB hot partition throttling and reducing read latency using DynamoDB Accelerator (DAX)
Tahmini Süre:1m 30s
Bu soruyu puanla