Soru

Zorluk: OrtaImproving Database and Caching Efficiency

A digital publishing company hosting peer-reviewed journals uses a Multi-AZ Amazon RDS for PostgreSQL DB instance to store journal articles and metadata. The platform experiences a massive increase in read requests when new volumes are published. The search engine queries are complex, and the database CPU utilization regularly exceeds 85%85\%, causing latency spikes for authors submitting new articles. The metadata does not change after publication, but high availability of the cached data is critical to ensure uninterrupted access. Which solution should a solutions architect implement to resolve the performance bottleneck while ensuring database efficiency?

  1. Deploy an Amazon ElastiCache for Redis replication group with Multi-AZ enabled, and configure the application to utilize a cache-aside strategy for metadata queries.Cevap
  2. B
    Deploy an Amazon ElastiCache for Memcached cluster, and configure the application to utilize a cache-aside strategy for metadata queries to handle the read volume.
  3. C
    Modify the existing Amazon RDS for PostgreSQL DB instance to enable a Multi-AZ deployment, and redirect read queries for journal metadata to the standby DB instance.
  4. D
    Deploy an Amazon ElastiCache for Memcached cluster, configure replication across multiple Availability Zones using read replicas, and use a write-through strategy for metadata.

Cevap

Deploy an Amazon ElastiCache for Redis replication group with Multi-AZ enabled, and configure the application to utilize a cache-aside strategy for metadata queries.
The correct option proposes deploying an Amazon ElastiCache for Redis replication group with Multi-AZ enabled. Redis supports replication and automatic failover across multiple Availability Zones, ensuring high availability. Applying a cache-aside pattern allows the application to serve the read-heavy, static journal metadata from the cache first, successfully reducing the database CPU utilization below the 85%85\% bottleneck.

Adım Adım Çözüm

1
Analyze the workload requirements and database bottleneck.
Identify that the database CPU is overloaded due to complex read-heavy queries for static metadata, and high availability of the cache is a hard requirement.
This helps determine that a caching layer is needed to offload reads from RDS, and the cache must support replication and failover.
2
Compare caching engines (Redis vs. Memcached) against the high-availability requirement.
Select Amazon ElastiCache for Redis because it supports multi-AZ replication groups with auto-failover, whereas Memcached does not support replication.
This satisfies the high-availability constraint for the cached metadata.
3
Choose the cache integration strategy.
Implement a cache-aside (lazy loading) strategy where the application queries Redis first, and falls back to RDS only on a cache miss, populating the cache afterwards.
This pattern is optimal for read-heavy databases with relatively static metadata, preventing unnecessary load on RDS.

Anahtar Kavram

Selecting the appropriate caching engine and architecture based on high-availability and replication requirements.
Tahmini Süre:2m 0s
Bu soruyu puanla