Soru

Zorluk: Çok zorApplication Caching and Session State Management

A development team is designing a highly scalable, stateless web application deployed on Amazon Elastic Container Service (ECS) tasks behind an Application Load Balancer. The application database layer is hosted on Amazon DynamoDB. The application requires:
1. Low-latency retrieval of product catalog data, which is read frequently but updated infrequently.
2. Reliable preservation of user shopping cart session state that must survive ECS task scale-in events.

Which TWO architectural configurations should the developer implement to meet these requirements? (Select TWO)

  1. Configure an Amazon DynamoDB Accelerator (DAX) cluster for the catalog table, routing read operations through the DAX client SDK.Cevap
  2. Store user session states in an Amazon ElastiCache for Redis cluster with replication enabled, and configure the application to read and write session data from the cluster.Cevap
  3. C
    Use DynamoDB Scan operations to load the catalog data and cache it in the ephemeral local storage of individual ECS tasks.
  4. D
    Resolve query throughput issues on the catalog table by scaling up the overall provisioned Read Capacity Units (RCUs) on the DynamoDB table, assuming that read throttling is caused by total capacity limits rather than hot partition keys.
  5. E
    Delegate session state management to a helper AWS Lambda function that stores shopping cart items in its global execution context variables to leverage execution context reuse.

Cevap

Configure an Amazon DynamoDB Accelerator (DAX) cluster for the catalog table and route read operations through the DAX client SDK, and store user session states in an Amazon ElastiCache for Redis cluster with replication enabled.
Utilizing Amazon ElastiCache for Redis with replication enabled ensures that user session data is durable and decoupled from the ephemeral container lifecycle of ECS tasks. Implementing Amazon DynamoDB Accelerator (DAX) ensures microsecond read latency and reduces the RCU load on the DynamoDB catalog table.

Adım Adım Çözüm

1
Analyze the requirements for product catalog data caching.
Catalog data is frequently read but rarely changed. It is stored in DynamoDB, making DynamoDB Accelerator (DAX) the ideal caching solution as it sits transparently in front of the table.
To offload read throughput and reduce latency to microseconds.
2
Analyze the requirements for user session state preservation.
User session state must be persistent, survive ECS task termination/scaling, and be accessible across multiple ECS instances. ElastiCache for Redis provides a shared, highly available cache.
Redis provides replication and failover support, making it optimal for persistent session management compared to local container storage.
3
Evaluate the non-viable options and eliminate them based on architecture design principles.
Local container caching and Lambda context reuse are ephemeral and fail persistence requirements. Scan operations are highly inefficient and should be avoided. Scaling up provisioned capacity does not address cache architecture requirements.
To ensure compliance with AWS architectural best practices.

Anahtar Kavram

Selecting appropriate caching layers (DAX vs ElastiCache Redis) and implementing externalized session stores for stateless compute workloads.
Bu soruyu puanla