Soru

Zorluk: ZorImproving Database and Caching Efficiency

An enterprise SaaS provider hosts a subscription management billing application on AWS. The application uses an Amazon Aurora PostgreSQL database cluster to manage subscriber billing profiles, transaction history, and subscription statuses. During monthly recurring billing runs and peak customer login windows, the Aurora DB cluster experiences significant CPU utilization spikes (over 90%) and database connection limits are frequently reached, leading to transaction timeouts. Analysis reveals two main issues: first, the application performs frequent read queries to retrieve static plan definitions and subscriber metadata that rarely change; second, high-volume write transactions update subscriber payment status, but subsequent immediately-triggered customer notifications trigger read queries seeking the newly updated subscription status, which requires absolute data consistency and must be highly available with automatic failover. Which TWO actions should the Solutions Architect recommend to improve database and caching efficiency? (Select TWO.)

  1. Deploy an Amazon ElastiCache for Redis cluster with Multi-AZ and automatic failover, and configure the application to cache static plan definitions and use a write-through caching strategy for subscription statuses.Cevap
  2. Deploy an Amazon RDS Proxy instance between the billing application and the Aurora DB cluster, and configure the application to route database connections through the proxy.Cevap
  3. C
    Deploy an Amazon ElastiCache for Memcached cluster to cache the subscriber billing metadata, and configure multi-AZ replication to ensure session persistence and automatic failover.
  4. D
    Configure Amazon Aurora Auto Scaling to dynamically provision additional read replicas, and configure the application to send subscription write updates directly to the reader endpoint to distribute write capacity.
  5. E
    Deploy an Amazon ElastiCache for Memcached cluster using a write-behind strategy to queue billing transaction updates and synchronize them with the Aurora database asynchronously.

Cevap

Deploying an Amazon ElastiCache for Redis cluster with Multi-AZ and automatic failover, using a write-through caching strategy for subscription statuses, and deploying an Amazon RDS Proxy instance to manage application database connections.
Deploying an Amazon ElastiCache for Redis cluster with Multi-AZ replication ensures high availability and automatic failover. Utilizing a write-through strategy for subscription status updates ensures that any reads immediately following a write will retrieve the latest consistent state from the cache. Deploying Amazon RDS Proxy resolves the connection scaling issues by pooling connections and reducing the CPU overhead on the Aurora DB cluster caused by high-concurrency connection spikes.

Adım Adım Çözüm

1
Analyze database CPU and connection bottlenecks.
Identify that CPU spikes are caused by connection limits being reached and redundant reads of static metadata.
Understanding the source of performance issues determines whether connection pooling or caching is required.
2
Select the appropriate caching engine for data requiring replication and failover.
Choose ElastiCache for Redis rather than Memcached.
Memcached does not support replication, Multi-AZ, or failover, making it unsuitable for highly available state caching.
3
Design cache strategy for data consistency.
Select a write-through caching strategy for updated subscription statuses.
Write-through ensures that the database and cache are updated simultaneously, satisfying the requirement for immediate read consistency after a status write.
4
Implement database connection pooling.
Introduce Amazon RDS Proxy in front of the database cluster.
RDS Proxy pools connections, shielding the Aurora DB cluster from CPU spikes caused by frequent connection setups during login surges.

Anahtar Kavram

Improving relational database and caching efficiency under high connection load and strict consistency/availability requirements using RDS Proxy and ElastiCache for Redis.
Bu soruyu puanla