A flight scheduling application retrieves flight status details from an Amazon DynamoDB table using the flight number as the partition key. During peak holiday seasons, a sudden surge in search requests for a small set of popular flights causes a latency spike and throws ProvisionedThroughputExceededException errors. The developer needs to optimize the application's performance, achieving sub-millisecond read latency without rewriting the database access patterns or changing the primary key design. Which of the following solutions should the developer implement?
- AIncrease the provisioned read capacity units (RCUs) on the DynamoDB table to handle the overall load, assuming the latency is due to table-wide limit constraints.
- BReplace the partition key queries with DynamoDB Scan operations containing a filter expression, and increase the provisioned read capacity units (RCUs) on the table.
- Deploy an Amazon DynamoDB Accelerator (DAX) cluster and configure the application to use the DAX client SDK.Cevap
- DPackage the application database logic in an AWS Lambda function with an increased execution timeout, relying on Lambda execution context reuse to cache query results locally.
Cevap
Deploying an Amazon DynamoDB Accelerator (DAX) cluster and configuring the application to use the DAX client SDK is the correct solution.
The correct solution is to deploy an Amazon DynamoDB Accelerator (DAX) cluster and use the DAX client SDK. DAX provides a fully managed, in-memory cache directly in front of DynamoDB that delivers microsecond response times for read-heavy workloads. Because it is API-compatible, it requires minimal changes to the application (only the client initialization needs to be updated to point to the DAX cluster instead of DynamoDB directly), satisfying the requirement to avoid rewriting database access patterns.
Adım Adım Çözüm
Anahtar Kavram
Caching read-heavy DynamoDB tables using DynamoDB Accelerator (DAX) to resolve hot partition keys and achieve microsecond latency.