An online collaborative workspace platform needs to store session state data for active users. The requirements specify that both read and write operations must consistently achieve sub-millisecond latency, even during sudden, unpredictable usage spikes. The database schema is a simple key-value structure containing user IDs and session tokens. Which database architecture should a solutions architect recommend to meet these requirements?
- AStore the session data in Amazon DynamoDB, using the current date formatted as YYYY-MM-DD as the partition key to group sessions by day.
- BDeploy an Amazon RDS for MySQL DB instance with multiple read replicas, and configure the application to write to the replicas during write spikes.
- Implement an Amazon ElastiCache for Redis cluster with replication enabled across multiple Availability Zones.Answer
- DStore the session data in Amazon DynamoDB configured with Provisioned Capacity Mode set to the lowest baseline to minimize database costs.
Answer
The correct architecture is to implement an Amazon ElastiCache for Redis cluster with replication enabled across multiple Availability Zones.
Implementing an Amazon ElastiCache for Redis cluster provides an in-memory data store that natively achieves sub-millisecond response times for both read and write operations. It is well-suited for key-value structures and handles unpredictable spikes through internal memory speed and scalable replication.
Step-by-Step Solution
Key Concept
In-memory database solutions, such as Amazon ElastiCache, are optimized for simple key-value operations that require sub-millisecond read/write latency under volatile workloads.