Soru

Zorluk: ZorImproving Database and Caching Efficiency

A financial technology company operates a stock trading platform where user portfolios and real-time transaction histories are stored in an Amazon Aurora MySQL database cluster. During periods of high market volatility, the database writer node experiences performance degradation due to high CPU utilization from a surge in application connection requests, and the read replicas experience significant replication lag. This replication lag causes users to view stale portfolio balances, leading to duplicate transaction attempts. The platform requires real-time read access to portfolio data with sub-millisecond latency, transaction session state persistence, and minimal database load.

Which combination of actions will resolve these issues while meeting the requirements? (Select TWO.)

  1. Implement Amazon ElastiCache for Redis in a Multi-AZ replication group to cache portfolio balances, utilizing a write-through strategy to keep the cache updated.Cevap
  2. Deploy Amazon RDS Proxy between the application layer and the Aurora MySQL cluster to pool and share database connections, reducing CPU overhead on the primary writer.Cevap
  3. C
    Implement Amazon ElastiCache for Memcached to store user portfolio balances and session states, configuring multi-region replication to ensure data persistence during failovers.
  4. D
    Direct read-heavy portfolio valuation queries to the RDS Multi-AZ standby instance of the database cluster to offload read traffic from the primary writer node.
  5. E
    Configure an Amazon ElastiCache for Memcached cluster to act as a write-through cache for transaction histories, enabling Append Only File (AOF) persistence to prevent data loss.

Cevap

Deploy Amazon ElastiCache for Redis in a Multi-AZ replication group using a write-through strategy, and deploy Amazon RDS Proxy between the application layer and the Aurora MySQL cluster.
Implementing ElastiCache for Redis provides the required sub-millisecond read latency, high availability (via Multi-AZ), and support for data persistence and replication. A write-through caching strategy ensures that portfolio balances are updated in the cache synchronously when written to the database, preventing stale reads. Deploying Amazon RDS Proxy pools database connections, which significantly reduces the CPU load on the database writer node during application connection surges.

Adım Adım Çözüm

1
Analyze the database performance bottlenecks and technical requirements.
Identify that the primary writer is CPU-constrained due to connection surges, and the read replicas have replication lag causing stale reads.
This defines the target areas for improvement: connection pooling for the writer and caching for read-heavy operations.
2
Select the appropriate caching technology and strategy for portfolio balances.
Choose Amazon ElastiCache for Redis with Multi-AZ replication and a write-through caching strategy.
Redis supports Multi-AZ replication and data persistence, which are required for portfolio balances and session state, while write-through ensures cache consistency.
3
Select a solution to handle connection surges and reduce writer CPU usage.
Introduce Amazon RDS Proxy between the application layer and the Aurora MySQL cluster.
RDS Proxy manages connection pools to prevent CPU spikes on the database cluster, ensuring efficient resource utilization during high volatility.

Anahtar Kavram

Improving database and caching efficiency involves using Redis for persistent, highly-available caching and RDS Proxy for connection pooling under high write and connection loads.
Bu soruyu puanla