Question

Difficulty: EasyApplication Caching and Session State Management

An application currently stores session data in the memory of individual web servers, which prevents the application tier from scaling horizontally. A developer needs to refactor the application to store session states externally with sub-millisecond to single-digit millisecond latency. Which TWO solutions should the developer use to achieve this? (Select TWO.)

  1. Amazon ElastiCache for RedisAnswer
  2. Amazon DynamoDBAnswer
  3. C
    AWS Secrets Manager
  4. D
    AWS Lambda execution context temporary storage (/tmp)
  5. E
    Amazon DynamoDB using Scan operations to retrieve session data on every page request

Answer

Amazon ElastiCache for Redis and Amazon DynamoDB
Amazon ElastiCache for Redis and Amazon DynamoDB are correct because they are managed, external services that offer the low-latency (sub-millisecond to single-digit millisecond) and high-throughput capabilities required for distributed session state storage.

Step-by-Step Solution

1
Identify the requirement for horizontal scalability and low latency for storing session states externally.
The solution must support high-throughput, low-latency reads and writes, and be accessible globally by all application servers.
Storing sessions locally prevents horizontal scaling because user requests must be pinned to a specific server (session stickiness).
2
Evaluate the AWS services designed for low-latency, scalable key-value storage.
Amazon ElastiCache for Redis (in-memory data store) and Amazon DynamoDB (NoSQL database) both provide fast, scalable, and external state management.
These services decouple session state from the compute tier, enabling stateless application servers to scale out.

Key Concept

Decoupling session state to external stores like ElastiCache or DynamoDB to enable stateless, horizontally scalable application tiers.
Rate this question