Soru

Zorluk: ZorImproving Database and Caching Efficiency

A smart home utility provider manages a platform on AWS where millions of smart meters report current power usage telemetry every 15 seconds. The telemetry updates are processed by an auto-scaled fleet of containerized ingestion microservices and written to an Amazon RDS for PostgreSQL DB instance. A customer-facing dashboard application displays real-time consumption statistics for users, resulting in high read queries.

During peak evening hours, the RDS DB instance experiences CPU utilization spikes up to 98% and database connection limits are frequently reached, leading to dropped telemetry writes and dashboard timeout errors. The dashboard requires the absolute latest consumption state with low latency, and this state must survive any infrastructure failover events.

Which of the following database and caching strategies should a Solutions Architect implement to improve database efficiency and resolve these performance issues? (Select TWO.)

  1. Deploy Amazon RDS Proxy between the ingestion microservices and the RDS DB instance to pool and reuse database connections, minimizing the CPU overhead of connection management.Cevap
  2. Implement an Amazon ElastiCache for Redis cluster with Multi-AZ replication and automatic failover enabled to store and serve the latest state of each meter, offloading the dashboard read queries.Cevap
  3. C
    Deploy an Amazon ElastiCache for Memcached cluster across multiple Availability Zones to cache the latest meter states, relying on Memcached's native multi-AZ data replication to guarantee state survival during a zone failover.
  4. D
    Configure the RDS PostgreSQL Multi-AZ DB instance's passive standby replica to accept read-only queries, and update the dashboard application's connection string to target the standby replica during peak hours.
  5. E
    Deploy an AWS Database Migration Service (DMS) replication task with Change Data Capture (CDC) to stream updates from the RDS instance to a separate database for dashboard reads, without enabling logical replication on the source PostgreSQL instance.

Cevap

The correct strategies are to deploy Amazon RDS Proxy to pool database connections, and implement an Amazon ElastiCache for Redis cluster with Multi-AZ replication to offload read queries.
Deploying Amazon RDS Proxy resolves the database connection limits and high CPU overhead by pooling connections. Implementing an Amazon ElastiCache for Redis cluster with Multi-AZ replication offloads the read traffic from the primary database while satisfying the requirement that cached data must survive Availability Zone failovers.

Adım Adım Çözüm

1
Analyze the cause of the database connection exhaustion and high CPU utilization.
PostgreSQL processes connections using a process-per-connection model, which consumes significant CPU and memory when thousands of microservices connect concurrently.
Understanding the connection overhead helps identify that connection pooling is needed.
2
Evaluate the use of Amazon RDS Proxy for connection management.
RDS Proxy pools and shares connections, shielding the database from connection spikes and reducing CPU overhead.
RDS Proxy solves the connection limit issue without requiring changes to database scaling.
3
Address the high read volume from the dashboard using a cache.
By placing an in-memory cache in front of the database, the dashboard queries can bypass the database entirely for state retrieval.
Caching reduces read CPU load and improves dashboard query response times.
4
Select the correct caching engine based on high availability and durability requirements.
Amazon ElastiCache for Redis supports replication, Multi-AZ failover, and persistence, ensuring cached state survives infrastructure outages. Memcached does not support these features.
Choosing Redis satisfies the constraint that the latest state must survive failover events.

Anahtar Kavram

Connection pooling with Amazon RDS Proxy and high-availability caching with Amazon ElastiCache for Redis are key techniques for optimizing performance, scalability, and efficiency in database-driven architectures on AWS.
Tahmini Süre:3m 0s
Bu soruyu puanla