Soru

Zorluk: KolayApplication Caching and Session State Management

A developer is designing a serverless e-commerce application that runs on AWS Lambda and uses Amazon DynamoDB. The developer needs to implement a session state management solution to store user shopping carts externally, and a database caching solution to reduce read latency for popular products.

Which TWO architectural decisions should the developer make to meet these requirements? (Select TWO.)

  1. Store user session states in Amazon DynamoDB with Time to Live (TTL) enabled to automatically delete expired shopping carts.Cevap
  2. Enable Amazon DynamoDB Accelerator (DAX) to cache database reads for popular products.Cevap
  3. C
    Store user session states in the local memory of the AWS Lambda execution context to persist shopping carts across all user requests.
  4. D
    Use AWS Secrets Manager to store and rotate session state data for each user shopping cart.
  5. E
    Store user session states in a separate DynamoDB table and perform a Scan operation on every request to find the session record by user ID.

Cevap

The developer should store user session states in Amazon DynamoDB with Time to Live (TTL) enabled, and enable Amazon DynamoDB Accelerator (DAX) to cache database reads for popular products.
Storing user session states in Amazon DynamoDB with TTL enabled allows the application to offload session storage to a highly available, scalable database while letting AWS automatically clean up expired sessions. Enabling DynamoDB Accelerator (DAX) provides an in-memory caching tier directly in front of DynamoDB, reducing read latency for popular products to sub-milliseconds without modifying application logic.

Adım Adım Çözüm

1
Identify the storage and lifecycle requirements for the user session states.
Amazon DynamoDB is suitable for key-value session storage, and enabling TTL allows automatic, cost-effective cleanup of expired session data.
Session data is transient and needs automatic deletion to avoid accumulating garbage data.
2
Identify the caching layer for database queries on popular products.
Amazon DynamoDB Accelerator (DAX) acts as an in-memory cache directly in front of Amazon DynamoDB.
DAX provides sub-millisecond response times for read-heavy workloads on DynamoDB tables without modifying application logic.

Anahtar Kavram

Selecting appropriate AWS services and features for application caching and session state management.
Tahmini Süre:1m 30s
Bu soruyu puanla