A developer is designing a web application deployed on Amazon ECS. The application requires an external session state store to manage user shopping carts. The session data must be retrieved with sub-millisecond response times, support nested JSON structures, and remain highly available even in the event of an infrastructure failure. Which architecture should the developer implement to meet these requirements?
- AStore the session data in an Amazon DynamoDB table and retrieve the shopping cart items using Scan operations with a filter expression on the user session ID.
- BSave the shopping cart details as configuration parameters in AWS Systems Manager Parameter Store, updating them using the parameter history.
- Deploy an Amazon ElastiCache for Redis cluster with Multi-AZ replication enabled to store the session data.Cevap
- DStore the session data in an Amazon DynamoDB table with a partition key based on the user's country code, and use DynamoDB Accelerator (DAX) to cache all updates.
Cevap
Deploying an Amazon ElastiCache for Redis cluster with Multi-AZ replication enabled to store the session data.
Deploying an Amazon ElastiCache for Redis cluster with Multi-AZ replication meets all requirements. Redis is an in-memory data store that achieves sub-millisecond latencies and natively supports complex data types (such as hashes, lists, and sets) which are ideal for nested JSON shopping cart data. Enabling Multi-AZ replication ensures automatic failover and high availability if the primary node encounters issues.
Adım Adım Çözüm
Anahtar Kavram
Selecting the appropriate in-memory caching engine (ElastiCache for Redis vs Memcached) and avoiding database bottlenecks for session state storage.
Tahmini Süre:1m 30s