Question

Difficulty: HardApplication Caching and Session State Management

A three-tier web application hosted on AWS is experiencing performance degradation. The database tier uses a single Amazon DynamoDB table that experiences high read traffic on specific partition keys, leading to ProvisionedThroughputExceededException errors. Concurrently, the application's auto-scaled Amazon EC2 instances are failing to share user login sessions because session data is stored locally. The developer needs to resolve both the database read bottlenecks and externalize the session state with minimal application latency. Which combination of actions should the developer take to meet these requirements? (Select TWO.)

  1. Implement Amazon DynamoDB Accelerator (DAX) in front of the database table to cache read responses.Answer
  2. Configure an Amazon ElastiCache for Redis cluster to serve as a centralized, replication-enabled session store.Answer
  3. C
    Scale up the provisioned read capacity units (RCUs) of the DynamoDB table to handle the surge in read requests.
  4. D
    Execute a periodic DynamoDB Scan operation to pre-load all user sessions into a local server cache.
  5. E
    Store the user session states as parameters in AWS Systems Manager Parameter Store to enable stateless scaling.

Answer

Implement Amazon DynamoDB Accelerator (DAX) to resolve the database read bottlenecks on hot keys, and configure Amazon ElastiCache for Redis as the centralized external session store.
The correct architecture uses Amazon DynamoDB Accelerator (DAX) to resolve read hot spots by caching queries in-memory at microsecond latency without changing application code. To support stateless scaling, the application should externalize its local session state to a centralized Amazon ElastiCache for Redis cluster, which provides replication, failover, and sub-millisecond performance.

Step-by-Step Solution

1
Analyze the database bottleneck and identify that the ProvisionedThroughputExceededException is caused by hot partition keys on the Amazon DynamoDB table.
Determine that an in-memory caching layer specifically designed for DynamoDB (like DAX) is required to reduce latency to microseconds and offload reads from hot keys.
Simply scaling up provisioned throughput (RCUs) cannot overcome the physical limits of a single hot partition, whereas DAX caches the reads transparently.
2
Analyze the session state requirement to enable stateless horizontal scaling for Amazon EC2 instances.
Identify that session state must be externalized to a high-performance, key-value store with replication and failover support.
Amazon ElastiCache for Redis supports the high-frequency read/write patterns and sub-millisecond latencies needed for session store management, while providing high availability.

Key Concept

Using specialized caches (DAX for DynamoDB reads, ElastiCache for Redis for session state) to offload database load and externalize state for stateless application scaling.
Rate this question