Q76 — AWS SAA-C03 Ch.11
Question 76 of 100 | ← Chapter 11
Q776. A company is building a shopping application on AWS. The application offers a catalog that changes once each month and needs to scale with traffic volume. The company wants the lowest possible latency from the application. Data from each user's shopping cart needs to be highly available. User session data must be available even if the user is disconnected and reconnects.What should a solutions architect do to ensure that the shopping cart data is preserved at all times?
- A. Configure an Application Load Balancer to enable the sticky sessions feature (session affinity) for access to the catalog in Amazon Aurora.
- B. Configure Amazon ElastiCache for Redis to cache catalog data from Amazon DynamoDB and shopping cart data from the user's session. ✓
- C. Configure Amazon OpenSearch Service to cache catalog data from Amazon DynamoDB and shopping cart data from the user's session.
- D. Configure an Amazon EC2 instance with Amazon Elastic Block Store (Amazon EBS) storage for the catalog and shopping cart. Configure automated snapshots.
Correct Answer: B. Configure Amazon ElastiCache for Redis to cache catalog data from Amazon DynamoDB and shopping cart data from the user's session.
Explanation
To ensure that the shopping cart data is preserved at all times in a shopping application on AWS while also meeting the requirements of low latency, high availability, and persistence of user session data, the following approach should be taken:B. Configure Amazon ElastiCache for Redis to cache catalog data from Amazon DynamoDB and shopping cart data from the user's session.Amazon ElastiCache for Redis is a fully managed in-memory data store service that can be used to achieve low latency and high availability for caching data. By configuring ElastiCache for Redis in the architecture, the following benefits can be realized:\1. Caching catalog data from Amazon DynamoDB: By caching frequently accessed catalog data in ElastiCache for Redis, the application can serve this data with low latency, reducing the load on the underlying DynamoDB database and improving the performance of catalog-related operations.\2. Caching shopping cart data from the user's session: By storing the shopping cart data in the user's session within ElastiCache for Redis, the data remains highly available even if the user is disconnected and reconnects. Redis provides persistence options to ensure that the data is preserved even if the cache node restarts or fails.\3. High availability: ElastiCache for Redis provides automatic failover and replication capabilities, ensuring that the cached data remains available even if a cache node or Availability Zone fails.Here's why the other options are not the most suitable choices:A. Configure an Application Load Balancer to enable the sticky sessions feature (session affinity) for access to the catalog in Amazon Aurora:Enabling session affinity in the Application Load Balancer would help maintain sticky sessions for the user's interaction with the catalog, but it does not address the preservation of shopping cart data or the persistence of user session data.C. Configure Amazon OpenSearch Service to cache catalog data from Amazon DynamoDB and shopping cart data from the user's session:Amazon OpenSearch Service (formerly Amazon Elasticsearch Service) is primarily used for full-text search and analytics use cases. While it can be leveraged for caching catalog data, it does not provide the necessary capabilities for preserving shopping cart data or user session data.D. Configure an Amazon EC2 instance with Amazon Elastic Block Store (Amazon EBS) storage for the catalog and shopping cart. Configure automated snapshots:Using an Amazon EC2 instance with Amazon EBS storage and automated snapshots might provide persistence for the catalog and shopping cart data, but it does not offer the low latency and high availability required by the application.Therefore, the most appropriate solution to ensure that the shopping cart data is preserved at all times, while meeting the requirements of low latency, high availability, and persistence of user session data, is to:B. Configure Amazon ElastiCache for Redis to cache catalog data from Amazon DynamoDB and shopping cart data from the user's session.