A logistics enterprise operates a fleet-tracking portal backed by an Amazon RDS for PostgreSQL Multi-AZ DB instance. The database stores real-time delivery route details, driver availability, and active shipment states. During shift changes, the database experiences CPU utilization spikes up to and application connection timeouts due to a surge in read queries from dispatchers querying driver status. A solutions architect must design a caching layer to offload these read-intensive queries. The caching solution must support multi-AZ replication to ensure high availability, automatic failover without application changes, and the capability to restore cached routing structures from disk in the event of a cache node restart. Additionally, the application requires sub-key eviction policies to purge specific route legs when driver status changes. Which configuration meets these requirements with the lowest operational complexity?
- Deploy an Amazon ElastiCache for Redis cluster with Multi-AZ enabled and automatic failover. Configure the application to use a Redis hash structure for route details, allowing the update and eviction of individual fields, and enable Redis replication groups.Answer
- BDeploy an Amazon ElastiCache for Memcached cluster with nodes distributed across multiple Availability Zones. Configure the application to serialize route legs as JSON strings, and implement a custom background script to periodically export cached keys to Amazon S3 to provide persistence.
- CEnable read routing on the secondary standby instance of the existing Amazon RDS for PostgreSQL Multi-AZ deployment, and update the application configuration to direct all read queries for driver status and active delivery states to this secondary instance.
- DDeploy an Amazon RDS Proxy instance in front of the PostgreSQL database, and configure a single-node Amazon ElastiCache for Redis instance with Append Only File (AOF) enabled, relying on the RDS Proxy to queue write operations during Redis cache failover events.