Question

Difficulty: EasyApplication Caching and Session State Management

A developer needs to improve the read performance of an application that frequently queries an Amazon DynamoDB table. The application requires sub-millisecond response times for these queries with minimal modifications to the application's existing database query code. Which solution should the developer implement?

  1. A
    Perform a DynamoDB Scan operation instead of a Query to retrieve all items into application memory during start-up.
  2. B
    Configure AWS Systems Manager Parameter Store to store the query results and retrieve them during each request.
  3. Enable Amazon DynamoDB Accelerator (DAX) and configure the application to use the DAX client SDK.Answer
  4. D
    Increase the provisioned read capacity units (RCUs) on the DynamoDB table and use an IAM role to authorize the additional capacity.

Answer

Enable Amazon DynamoDB Accelerator (DAX) and configure the application to use the DAX client SDK.
Amazon DynamoDB Accelerator (DAX) is an API-compatible in-memory cache designed specifically for DynamoDB. It provides sub-millisecond response times for read operations and requires only updating the client configuration rather than rewriting query logic.

Step-by-Step Solution

1
Identify the performance requirement for sub-millisecond query latency on an Amazon DynamoDB table.
Determine that an in-memory caching layer is required to reduce latency from single-digit milliseconds to microseconds.
This filters the options to mechanisms that provide database caching.
2
Evaluate the requirement for minimal application code changes.
Identify Amazon DynamoDB Accelerator (DAX) as the only caching option that is fully API-compatible with DynamoDB, requiring only a client SDK change rather than rewriting queries.
Other options require complex cache-aside logic or are not suitable for high-throughput databases.

Key Concept

Using Amazon DynamoDB Accelerator (DAX) for sub-millisecond caching with minimal application code modifications
Rate this question