Question

Difficulty: Very hardImproving Database and Caching Efficiency

A smart grid utility metering company operates an IoT platform that ingests high-frequency energy consumption data from millions of smart meters. The ingestion microservices write data directly to a PostgreSQL database hosted on Amazon RDS. During peak intervals, the database experiences severe write contention and CPU utilization spikes to 95%95\%, causing delayed telemetry processing and dropped ingestion requests. A Solutions Architect must optimize the database tier to reduce ingestion latency, lower RDS connection overhead, and ensure that real-time analytics dashboards can read the aggregated telemetry with sub-millisecond response times. The architecture requires high availability, automatic failover, and the ability to reconstruct historical metrics from the cache if the database is temporarily offline. Which combination of architectural optimizations should the Solutions Architect implement to resolve the performance bottlenecks while meeting the requirements? (Select TWO.)

  1. Deploy an Amazon ElastiCache for Redis cluster with Multi-AZ replication and append-only file (AOF) persistence enabled, caching the frequently accessed real-time telemetry metrics to offload read traffic.Answer
  2. Deploy Amazon RDS Proxy between the ingestion microservices and the RDS PostgreSQL instance to manage database connection pooling.Answer
  3. C
    Deploy an Amazon ElastiCache for Memcached cluster with auto-discovery enabled to cache the real-time telemetry metrics, configuring replica nodes across multiple Availability Zones to ensure data persistence.
  4. D
    Configure an Amazon DynamoDB Accelerator (DAX) cluster in front of the RDS PostgreSQL database to transparently cache query results.
  5. E
    Configure PostgreSQL synchronous replication to a new Read Replica in another Availability Zone, and update the analytics dashboards to query the replica using the primary database endpoint.

Answer

Deploying Amazon RDS Proxy to establish connection pooling and deploying an Amazon ElastiCache for Redis cluster with Multi-AZ replication and persistence enabled to cache the real-time telemetry metrics.
Deploying Amazon RDS Proxy resolves the database's CPU and write-path bottleneck by establishing a persistent connection pool, mitigating connection churn from the ingestion microservices. Concurrently, deploying Amazon ElastiCache for Redis with Multi-AZ replication and persistence (AOF) enabled allows the application to offload real-time analytical read queries to a high-performance in-memory cache, while ensuring data durability and automatic failover capability.

Step-by-Step Solution

1
Analyze the ingestion bottleneck
High connection churn from microservices to RDS PostgreSQL causes CPU exhaustion and write contention.
Creating and destroying database connections frequently is resource-intensive for PostgreSQL.
2
Address the connection overhead
Introduce Amazon RDS Proxy to pool and reuse database connections.
Connection pooling mitigates CPU spikes by maintaining a warm pool of established connections to the RDS instance.
3
Address the read latency and caching durability requirements
Select Amazon ElastiCache for Redis with Multi-AZ and AOF persistence enabled.
Redis is selected over Memcached because it supports data replication, high availability, and persistence features required to reconstruct metrics during DB downtime.

Key Concept

Mitigating RDS CPU and write bottlenecks using RDS Proxy for connection pooling, combined with ElastiCache Redis for durable, replicated caching.
Estimated Time:3m 0s
Rate this question