A developer is designing the backend for a real-time ridesharing application. The application requires two distinct state management components:
1. A temporary queue for passenger-to-driver matching that requires fast, in-memory operations and support for sorted data structures.
2. A persistent data store for user session configurations (such as notification preferences) that must automatically expire after days of user inactivity.
Which combination of actions should the developer take to meet these requirements? (Select TWO)
- Use Amazon ElastiCache for Redis to store and manage the passenger-to-driver matching queues.Answer
- Use Amazon DynamoDB to store user session configurations and configure DynamoDB Time to Live (TTL) on the expiration attribute.Answer
- CUse Amazon DynamoDB to store user session configurations and run a daily Scan operation to identify and delete expired records.
- DUse AWS Systems Manager Parameter Store to dynamically store and update the session configurations for each active passenger.
- EUse Amazon Cognito Identity Pools to store user session configuration attributes as custom developer attributes.
Answer
Use Amazon ElastiCache for Redis to manage the temporary queues, and use Amazon DynamoDB with Time to Live (TTL) to store the persistent user session configurations.
The correct combination uses Amazon ElastiCache for Redis to store temporary passenger-to-driver matching queues since Redis native data types (like Sorted Sets) are designed for sorting and sub-millisecond latency. For persistent session state storage, Amazon DynamoDB is the industry-standard choice because it can scale horizontally and has a native Time to Live (TTL) feature that automatically expires items after days without consuming read or write capacity.
Step-by-Step Solution
Key Concept
Selecting appropriate caching and session state management services based on data structure, persistence, and expiration requirements.
Estimated Time:2m 0s