Question

Difficulty: HardImproving Database and Caching Efficiency

A logistics company runs a real-time fleet tracking platform on AWS. The application uses an Amazon RDS for PostgreSQL Multi-AZ DB instance to store active delivery vehicle telemetry (current coordinates, speed, and status) and historical trip logs. During high-demand delivery windows, the platform experiences significant write latency because of lock contention on the database, while dispatchers report that dashboard queries for active vehicle locations take several seconds to load. The database CPU utilization routinely spikes to 95%. A solutions architect must optimize the database and caching layer. The new solution must achieve sub-millisecond read latency for active vehicle queries, scale to handle high-frequency telemetry writes, reduce database connection overhead, and guarantee high availability with replication for the cached telemetry data. Which two actions should the solutions architect take to resolve the bottlenecks? (Select TWO.)

  1. Deploy an Amazon ElastiCache for Redis cluster with Multi-AZ replication enabled to cache the latest active vehicle coordinates, serving dashboard reads directly from the cache.Answer
  2. B
    Deploy an Amazon ElastiCache for Memcached cluster to store active vehicle locations, configuring replication to a standby node in another Availability Zone.
  3. Implement Amazon RDS Proxy between the application servers and the PostgreSQL database, and create an RDS Read Replica to offload dispatcher dashboard reads from the primary DB instance.Answer
  4. D
    Configure the application to route dispatcher dashboard read queries directly to the Multi-AZ standby instance of the RDS for PostgreSQL DB instance to offload the primary writer.
  5. E
    Deploy Amazon DynamoDB Accelerator (DAX) directly in front of the RDS for PostgreSQL DB instance to cache SQL queries and write telemetry updates using a write-through strategy.

Answer

Deploying an Amazon ElastiCache for Redis cluster with Multi-AZ replication enabled, and implementing Amazon RDS Proxy with an RDS Read Replica.
Deploying an Amazon ElastiCache for Redis cluster with Multi-AZ replication enabled provides the required sub-millisecond read latency for the active vehicle coordinates while ensuring high availability. Implementing Amazon RDS Proxy solves connection overhead during high-frequency telemetry write spikes, and adding an RDS Read Replica offloads the dispatcher dashboard queries from the primary database instance to eliminate read-write contention.

Step-by-Step Solution

1
Analyze the database performance bottlenecks to separate read-heavy dashboard queries from write-heavy telemetry updates.
Identified read-write contention on the primary RDS instance and high CPU usage due to dashboard reads.
Helps design a decoupled read/write scaling strategy.
2
Evaluate caching requirements for the active vehicle telemetry data.
Selected Amazon ElastiCache for Redis because it supports sub-millisecond latencies, replication, and multi-AZ failover, whereas Memcached lacks replication.
Ensures caching high availability and low-latency access.
3
Deploy Amazon RDS Proxy to sit between the application and the RDS DB instance.
Reduces connection pooling overhead on the primary instance during peak log upload bursts.
Maintains database stability under sudden connection spikes.
4
Create an Amazon RDS Read Replica and route dashboard read queries to it.
Offloads complex queries from the primary instance to the read replica, avoiding lock contention.
Allows scaling read and write operations independently.

Key Concept

Database and cache efficiency improvements by offloading read queries to replicas and caching active data using Redis instead of Memcached, combined with RDS Proxy connection pooling.
Rate this question